From 26fc782913981330e5e77babf1e8cb7f8628bca6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20L=C3=B6nnhager?= Date: Sat, 28 Oct 2023 14:44:35 +0200 Subject: [PATCH] add jobs for windows & macos --- .github/workflows/desktop-e2e.yml | 96 +++++++++++++++++++++++++++++-- 1 file changed, 92 insertions(+), 4 deletions(-) diff --git a/.github/workflows/desktop-e2e.yml b/.github/workflows/desktop-e2e.yml index 2bca4d6a361b..0ad76d6f4b35 100644 --- a/.github/workflows/desktop-e2e.yml +++ b/.github/workflows/desktop-e2e.yml @@ -83,9 +83,51 @@ jobs: with: name: ${{ matrix.os }}_report path: ./test/.ci-logs/${{ matrix.os }}_report + + build-windows: + runs-on: windows-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Checkout submodules + run: git submodule update --init --depth=1 + - name: Install Protoc + uses: arduino/setup-protoc@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/setup-node@v3 + with: + node-version: 18 + - name: Install Rust + uses: actions-rs/toolchain@v1.0.6 + with: + toolchain: stable + target: i686-pc-windows-msvc + default: true + - name: Install msbuild + uses: microsoft/setup-msbuild@v1.0.2 + with: + vs-version: 16 + - name: Build app + shell: bash + env: + # On Windows, the checkout is on the D drive, which is very small. + # Moving the target directory to the C drive ensures that the runner + # doesn't run out of space on the D drive. + CARGO_TARGET_DIR: "C:/cargo-target" + run: ./build.sh + - name: Build test executable + shell: bash + run: ./gui/scripts/build-test-executable.sh + - uses: actions/upload-artifact@v3 + if: '!cancelled()' + with: + name: windows-build + path: .\dist\*.exe + e2e-test-windows: - # TEMP - if: false + needs: build-windows + if: '!cancelled()' name: Windows end-to-end tests runs-on: [self-hosted, desktop-test, Linux] # app-test-linux timeout-minutes: 240 @@ -94,6 +136,11 @@ jobs: matrix: os: [windows10, windows11] steps: + - uses: actions/download-artifact@v3 + if: ${{ needs.build-windows.result == 'success' }} + with: + name: windows-build + path: ~/.cache/mullvad-test/packages - name: Checkout repository uses: actions/checkout@v4 with: @@ -107,9 +154,44 @@ jobs: with: name: ${{ matrix.os }}_report path: ./test/.ci-logs/${{ matrix.os }}_report + + build-macos: + runs-on: macos-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Checkout submodules + run: git submodule update --init --depth=1 + - name: Install Protoc + uses: arduino/setup-protoc@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/setup-node@v3 + with: + node-version: 18 + - name: Install Rust + uses: actions-rs/toolchain@v1.0.6 + with: + toolchain: stable + default: true + - name: Install Go + uses: actions/setup-go@v3 + with: + go-version: 1.18.5 + run: ./build.sh + - name: Build test executable + run: ./gui/scripts/build-test-executable.sh + - uses: actions/upload-artifact@v3 + if: '!cancelled()' + with: + name: macos-build + path: | + ./dist/*.pkg + ./dist/app-e2e-* + e2e-test-macos: - # TEMP - if: false + needs: build-macos + if: '!cancelled()' name: macOS end-to-end tests runs-on: [self-hosted, desktop-test, macOS] # app-test-macos-arm timeout-minutes: 240 @@ -118,6 +200,11 @@ jobs: matrix: os: [macos-14, macos-13, macos-12] steps: + - uses: actions/download-artifact@v3 + if: ${{ needs.build-macos.result == 'success' }} + with: + name: macos-build + path: ~/Library/Caches/mullvad-test/packages - name: Checkout repository uses: actions/checkout@v4 with: @@ -131,6 +218,7 @@ jobs: with: name: ${{ matrix.os }}_report path: ./test/.ci-logs/${{ matrix.os }}_report + compile-test-matrix: name: Result matrix needs: [e2e-test-linux, e2e-test-windows, e2e-test-macos]