From f70309e605bd8d4ac039fd23ce0f3809fa2561bc Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Thu, 9 May 2024 22:21:13 +0100 Subject: [PATCH] ci: include conditions --- .github/workflows/build-and-test.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 2342a576..3d61d536 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -68,22 +68,22 @@ jobs: - name: Set up QEMU - if: ${{ matrix.docker == true }} && ${{ matrix.alpine == true }} && ${{ matrix.arch == 'aarch64' }} + if: ${{ matrix.docker == 'true' }} && ${{ matrix.alpine == 'true' }} && ${{ matrix.arch == 'arm64' }} uses: docker/setup-qemu-action@v3 - - if: ${{ matrix.docker == true }} && ${{ matrix.alpine == true }} + - if: ${{ matrix.docker == 'true' }} && ${{ matrix.alpine == 'true' }} name: prebuild linux ${{ matrix.arch }} musl run: docker run -v $PWD:/home --platform linux/${{ matrix.arch }} -e CIRRUS_CI=true --rm node:20-alpine bin/sh -c 'apk add bash && cd /home && bash -c "/home/script/ci/prebuild-alpine.sh" && rm -rf ffi node_modules' - - if: ${{ matrix.docker == true }} && ${{ matrix.alpine == false }} + - if: ${{ matrix.docker == 'true' }} && ${{ matrix.alpine != 'true' }} name: prebuild linux ${{ matrix.arch }} run: docker run -v $PWD:/home --platform linux/${{ matrix.arch }} -e CIRRUS_CI=true --rm node:20 bin/sh -c 'cd /home && /home/script/ci/prebuild-alpine.sh && rm -rf ffi node_modules' - run: sudo chown -R $(id -u):$(id -g) prebuilds - if: ${{ matrix.docker == true }} + if: ${{ matrix.docker == 'true' }} - run: ./script/ci/prebuild.sh - if: ${{ matrix.docker != true }} + if: ${{ matrix.docker != 'true' }} - name: Upload prebuild for ${{ runner.os }}-${{ runner.arch }} uses: actions/upload-artifact@v3 @@ -148,26 +148,26 @@ jobs: run: echo "ONLY_DOWNLOAD_PACT_FOR_WINDOWS=true" >> $GITHUB_ENV - run: LOG_LEVEL=debug ./script/ci/unpack-and-test.sh - if: ${{ matrix.docker != true }} + if: ${{ matrix.docker != 'true' }} # Linux aarch64 tests are skipped as QEMU fails when executing the ruby binaries # Related comment: https://github.com/phusion/passenger/issues/2288#issuecomment-1387625121 - name: Set up QEMU - if: ${{ matrix.docker == true }} && ${{ matrix.alpine == true }} && ${{ matrix.arch == 'arm64' }} + if: ${{ matrix.docker == 'true' }} && ${{ matrix.alpine == 'true' }} && ${{ matrix.arch == 'arm64' }} uses: docker/setup-qemu-action@v3 - - if: ${{ matrix.docker == true }} && ${{ matrix.alpine == false }} + - if: ${{ matrix.docker == 'true' }} && ${{ matrix.alpine != 'true' }} name: test arm64 run: docker run -v $PWD:/home --platform linux/${{ matrix.arch }} --rm node:20 bin/bash -c 'cd /home && /home/script/ci/unpack-and-test.sh' - - if: ${{ matrix.docker == true }} && ${{ matrix.alpine == true }} && ${{ matrix.arch == 'amd64' }} + - if: ${{ matrix.docker == 'true' }} && ${{ matrix.alpine == 'true' }} && ${{ matrix.arch == 'amd64' }} name: test linux amd64 musl run: docker run -v $PWD:/home --platform linux/${{ matrix.arch }} -e CIRRUS_CI=true --rm node:20-alpine bin/sh -c 'apk add bash curl gcompat && cd /home && /home/script/ci/unpack-and-test.sh' - - if: ${{ matrix.docker == true }} && ${{ matrix.alpine == false }} && ${{ matrix.arch == 'arm64' }} + - if: ${{ matrix.docker == 'true' }} && ${{ matrix.alpine == false }} && ${{ matrix.arch == 'arm64' }} name: test linux arm64 musl run: docker run -v $PWD:/home --platform linux/${{ matrix.arch }} -e CIRRUS_CI=true --rm node:20-alpine bin/sh -c 'apk add bash curl libc6-compat gcompat && cd /home && /home/script/ci/unpack-and-test.sh'