diff --git a/.github/actions/prepare_buildozer/action.yml b/.github/actions/prepare_buildozer/action.yml new file mode 100644 index 00000000..60c6e019 --- /dev/null +++ b/.github/actions/prepare_buildozer/action.yml @@ -0,0 +1,33 @@ +name: 'Prepare Buildozer' +description: 'Download buildozer and make it available on PATH' +inputs: + version: + description: 'Buildozer version' + required: true +runs: + using: "composite" + steps: + - run: | + # Determine buildozer URL + BASE_URL="https://github.com/bazelbuild/buildtools/releases/download/v${{ inputs.version }}" + if [[ "${RUNNER_OS}" == "Linux" ]]; then + BUILDOZER_URL="${BASE_URL}/buildozer-linux-amd64" + elif [ "${RUNNER_OS}" == "macOS" ]; then + BUILDOZER_URL="${BASE_URL}/buildozer-darwin-amd64" + elif [ "${RUNNER_OS}" == "Windows" ]; then + BUILDOZER_URL="${BASE_URL}/buildozer-windows-amd64.exe" + else + echo "'${RUNNER_OS}' is not supported" + exit 1 + fi + + # Download buildozer + BUILDOZER_DIR="/tmp/bin" + BUILDOZER_PATH="${BUILDOZER_DIR}/buildozer" + mkdir -p "${BUILDOZER_DIR}" + wget --no-verbose "${BUILDOZER_URL}" -O "${BUILDOZER_PATH}" + + # Make buildozer available on PATH for subsequent actions + chmod +x "${BUILDOZER_PATH}" + echo "${BUILDOZER_DIR}" >> $GITHUB_PATH + shell: bash diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1b962180..07c17cb2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -61,18 +61,19 @@ jobs: python execute_tests.py -b 7.0.0 -p 3.8.18 integration-tests-apply-fixes: - runs-on: ubuntu-22.04 + strategy: + matrix: + os: [ ubuntu-22.04, macos-12 ] + runs-on: ${{ matrix.os }} needs: [ fast-tests ] steps: - - run: | - mkdir --parents /tmp/bin - wget --no-verbose https://github.com/bazelbuild/buildtools/releases/download/v6.4.0/buildozer-linux-amd64 -O /tmp/bin/buildozer - chmod +x /tmp/bin/buildozer - uses: actions/checkout@v4 + - uses: ./.github/actions/prepare_buildozer + with: + version: '6.4.0' - name: Integration tests - Applying fixes run: | - export PATH=/tmp/bin:$PATH - ./test/apply_fixes/execute_tests.py + python test/apply_fixes/execute_tests.py integration-tests-examples: strategy: