diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 692da344..8828d9dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,12 +3,18 @@ name: ci on: [push, pull_request] jobs: + clean-pkg-dir: + steps: + - name: clean pkg/ dir + run: | + rm pkg/*.gem native-gems: + needs: clean-pkg-dir strategy: fail-fast: false matrix: ruby: [2.7, 3.0, 3.1, 3.2] - platform: + platform: - { os: ubuntu, target: linux-x64 } - { os: macos, target: macos-x64 } runs-on: ${{ matrix.platform.os }}-latest @@ -62,6 +68,7 @@ jobs: # - We're not testing here also because it's been taken care of in the previous # step install-only-gem: + needs: clean-pkg-dir runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -106,11 +113,12 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} disable-sys-libs: + needs: clean-pkg-dir strategy: fail-fast: false matrix: ruby: [2.7, 3.0, 3.1, 3.2] - platform: + platform: - { os: ubuntu, target: linux-x64, ext: so } - { os: macos, target: macos-x64, ext: dylib } runs-on: ${{ matrix.platform.os }}-latest @@ -142,11 +150,11 @@ jobs: bundle exec rake test - name: fresh project on PR if: github.event_name == 'pull_request' - env: + env: BRANCH: HEAD run: bin/ci-test-project - name: fresh project when not a PR if: github.event_name != 'pull_request' - env: + env: BRANCH: ${{ github.ref_name }} run: bin/ci-test-project