From c40f4b0185557ed9157fff234381c9faa9fb359e Mon Sep 17 00:00:00 2001 From: David Widmann Date: Mon, 16 Jun 2025 11:28:23 +0200 Subject: [PATCH] Update CI --- .github/workflows/CI.yml | 37 ++++++++++++++----------- .github/workflows/CompatHelper.yml | 2 +- .github/workflows/IntegrationTest.yml | 2 +- .github/workflows/Invalidations.yml | 40 --------------------------- .github/workflows/JuliaNightly.yml | 20 ++++++-------- .github/workflows/format.yml | 2 +- 6 files changed, 33 insertions(+), 70 deletions(-) delete mode 100644 .github/workflows/Invalidations.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3cdb284b8..5d88f262b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -10,6 +10,12 @@ concurrency: # Cancel intermediate builds: only if it is a pull request build. group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} + +# needed to allow julia-actions/cache to delete old caches that it has created +permissions: + actions: write + contents: read + jobs: test: name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} @@ -19,39 +25,33 @@ jobs: matrix: version: - "1" # Latest Release - - "1.6" # LTS + - "min" # Oldest supported Julia release os: - ubuntu-latest - - macOS-latest + - macOS-13 # Intel - windows-latest arch: - x64 - x86 exclude: # Test 32-bit only on Linux - - os: macOS-latest + - os: macOS-13 arch: x86 - os: windows-latest arch: x86 + include: + - os: macOS-latest # Apple Silicon + version: "1" + arch: aarch64 steps: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - - uses: actions/cache@v4 - env: - cache-name: cache-artifacts - with: - path: ~/.julia/artifacts - key: ${{ runner.os }}-${{ matrix.arch }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} - restore-keys: | - ${{ runner.os }}-${{ matrix.arch }}-test-${{ env.cache-name }}- - ${{ runner.os }}-${{ matrix.arch }}-test- - ${{ runner.os }}-${{ matrix.arch }}- - ${{ runner.os }}- - - uses: julia-actions/julia-buildpkg@latest - - uses: julia-actions/julia-runtest@latest + - uses: julia-actions/cache@v2 + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v5 with: @@ -62,11 +62,16 @@ jobs: docs: name: Documentation runs-on: ubuntu-latest + permissions: + contents: write # Required when authenticating with `GITHUB_TOKEN`, not needed when authenticating with SSH deploy keys + pull-requests: read # Required when using `push_preview=true` + statuses: write # Optional, used to report documentation build statuses steps: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v2 with: version: '1.6' + - uses: julia-actions/cache@v2 - run: | julia --project=docs -e ' using Pkg diff --git a/.github/workflows/CompatHelper.yml b/.github/workflows/CompatHelper.yml index 6c96707af..804232605 100644 --- a/.github/workflows/CompatHelper.yml +++ b/.github/workflows/CompatHelper.yml @@ -13,4 +13,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }} - run: julia -e 'using CompatHelper; CompatHelper.main()' + run: julia -e 'using CompatHelper; CompatHelper.main(; subdirs = ["", "docs"])' diff --git a/.github/workflows/IntegrationTest.yml b/.github/workflows/IntegrationTest.yml index 1e4a1a5f7..e519447f6 100644 --- a/.github/workflows/IntegrationTest.yml +++ b/.github/workflows/IntegrationTest.yml @@ -45,7 +45,7 @@ jobs: with: version: ${{ matrix.julia-version }} arch: x64 - - uses: julia-actions/julia-buildpkg@latest + - uses: julia-actions/julia-buildpkg@v1 - name: Clone Downstream uses: actions/checkout@v4 with: diff --git a/.github/workflows/Invalidations.yml b/.github/workflows/Invalidations.yml deleted file mode 100644 index 66c86a362..000000000 --- a/.github/workflows/Invalidations.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Invalidations - -on: - pull_request: - -concurrency: - # Skip intermediate builds: always. - # Cancel intermediate builds: always. - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - evaluate: - # Only run on PRs to the default branch. - # In the PR trigger above branches can be specified only explicitly whereas this check should work for master, main, or any other default branch - if: github.base_ref == github.event.repository.default_branch - runs-on: ubuntu-latest - steps: - - uses: julia-actions/setup-julia@v2 - with: - version: '1' - - uses: actions/checkout@v4 - - uses: julia-actions/julia-buildpkg@v1 - - uses: julia-actions/julia-invalidations@v1 - id: invs_pr - - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.repository.default_branch }} - - uses: julia-actions/julia-buildpkg@v1 - - uses: julia-actions/julia-invalidations@v1 - id: invs_default - - - name: Report invalidation counts - run: | - echo "Invalidations on default branch: ${{ steps.invs_default.outputs.total }} (${{ steps.invs_default.outputs.deps }} via deps)" >> $GITHUB_STEP_SUMMARY - echo "This branch: ${{ steps.invs_pr.outputs.total }} (${{ steps.invs_pr.outputs.deps }} via deps)" >> $GITHUB_STEP_SUMMARY - - name: Check if the PR does increase number of invalidations - if: steps.invs_pr.outputs.total > steps.invs_default.outputs.total - run: exit 1 diff --git a/.github/workflows/JuliaNightly.yml b/.github/workflows/JuliaNightly.yml index 991e9ec8f..5fa0e55c0 100644 --- a/.github/workflows/JuliaNightly.yml +++ b/.github/workflows/JuliaNightly.yml @@ -12,6 +12,12 @@ concurrency: # Cancel intermediate builds: only if it is a pull request build. group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} + +# needed to allow julia-actions/cache to delete old caches that it has created +permissions: + actions: write + contents: read + jobs: test: name: Julia Nightly - Ubuntu - x64 @@ -21,17 +27,9 @@ jobs: - uses: julia-actions/setup-julia@v2 with: version: nightly - arch: x64 - - uses: actions/cache@v4 - env: - cache-name: julia-nightly-cache-artifacts - with: - path: ~/.julia/artifacts - key: ${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} - restore-keys: | - ${{ env.cache-name }}- - - uses: julia-actions/julia-buildpkg@latest - - uses: julia-actions/julia-runtest@latest + - uses: julia-actions/cache@v2 + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v5 with: diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index f80377a24..0f1ad85f9 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: julia-actions/setup-julia@latest + - uses: julia-actions/setup-julia@v2 with: version: 1 - run: |