From a7e394210114726586a35f1ae92c02fbdd577360 Mon Sep 17 00:00:00 2001 From: Dario Lombardo Date: Sat, 15 Feb 2020 23:01:54 +0100 Subject: [PATCH] Add github actions yaml files. Change-Id: I06e9968b792d9c218273873f36ee8e9157b04344 Reviewed-on: https://code.wireshark.org/review/36181 Reviewed-by: Alexis La Goutte Reviewed-by: Anders Broman --- .github/workflows/macos.yml | 35 ++++++++++++++++++++++++++ .github/workflows/ubuntu.yml | 35 ++++++++++++++++++++++++++ .github/workflows/windows.yml | 47 +++++++++++++++++++++++++++++++++++ 3 files changed, 117 insertions(+) create mode 100644 .github/workflows/macos.yml create mode 100644 .github/workflows/ubuntu.yml create mode 100644 .github/workflows/windows.yml diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 0000000000..aed72f724d --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,35 @@ +name: Build MacOS + +on: [push] + +jobs: + windows: + name: Build & Test + runs-on: macos-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install deps + run: ./tools/macos-setup-brew.sh + - name: Mkdir + run: mkdir build + - name: Cmake + working-directory: build + run: cmake -GNinja .. + - name: Build + run: ninja + working-directory: build + - name: Build test-programs + run: ninja test-programs + working-directory: build + - name: Set up Python 3.8 + uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: Install pytest + run: pip install pytest pytest-xdist + - name: Run tests + env: + PYTEST_ADDOPTS: --skip-missing-programs=rawshark + run: pytest + working-directory: build diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml new file mode 100644 index 0000000000..eb402d870b --- /dev/null +++ b/.github/workflows/ubuntu.yml @@ -0,0 +1,35 @@ +name: Build Ubuntu + +on: [push] + +jobs: + windows: + name: Build & Test + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install deps + run: sudo tools/debian-setup.sh --install-optional --install-test-deps python3-pip -y + - name: Mkdir + run: mkdir build + - name: Cmake + working-directory: build + run: cmake -GNinja .. + - name: Build + run: ninja + working-directory: build + - name: Build test-programs + run: ninja test-programs + working-directory: build + - name: Set up Python 3.8 + uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: Install pytest + run: pip install pytest pytest-xdist + - name: Run tests + env: + PYTEST_ADDOPTS: --skip-missing-programs=rawshark + run: pytest + working-directory: build diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 0000000000..ec61f2cd80 --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,47 @@ +name: Build Windows + +on: [push] + +jobs: + windows: + name: Build & Test + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Choco install + run: cinst -y --no-progress --force winflexbison3 cmake + - name: Install strawberryperl + run: | + choco install strawberryperl + echo "##[add-path]C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin" + - name: Install Qt + # Using ouuan's due to this bug + # https://github.com/jurplel/install-qt-action/issues/27 + uses: ouuan/install-qt-action@v2.3.1 + - name: Mkdir + run: mkdir build + - name: Cmake + run: cmake -A x64 .. + env: + PLATFORM: x64 + WIRESHARK_BASE_DIR: C:/wireshark-libs + QT5_BASE_DIR: C:/Qt/5.12.3/msvc2017_64 + working-directory: build + - name: Build + run: cmake --build . --config RelWithDebInfo + working-directory: build + - name: Build test-programs + run: cmake --build . --config RelWithDebInfo --target test-programs + working-directory: build + - name: Set up Python 3.8 + uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: Install pytest + run: pip install pytest pytest-xdist + - name: Run tests + env: + PYTEST_ADDOPTS: --skip-missing-programs=rawshark + run: pytest + working-directory: build