From c527b6324e77d5e536513cdddf45f75301bd7b97 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 17 Mar 2025 12:14:41 +0100 Subject: [PATCH 1/3] CI: use julia-actions/cache --- .github/workflows/CI.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 23ba9c96..025cc4b7 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -28,16 +28,7 @@ jobs: with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - - uses: actions/cache@v4 - env: - cache-name: cache-artifacts - with: - path: ~/.julia/artifacts - key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} - restore-keys: | - ${{ runner.os }}-test-${{ env.cache-name }}- - ${{ runner.os }}-test- - ${{ runner.os }}- + - uses: julia-actions/cache@v2 - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 From bbdc9defebbcbb612d24a4855016381ebc3037df Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 17 Mar 2025 12:19:56 +0100 Subject: [PATCH 2/3] CI: don't force arch unless needed ... so that e.g. macOS ARM runners can use a native Julia However for Julia 1.6 on macOS we need to take special care, see for details. --- .github/workflows/CI.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 025cc4b7..bd64ba05 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -18,16 +18,25 @@ jobs: # - 'nightly' os: - ubuntu-latest - - macOS-latest + - macos-latest - windows-latest arch: - - x64 + - '' + exclude: + - os: macos-latest # Apple Silicon + version: '1.6' + arch: '' + include: + - os: macos-latest # Apple Silicon + version: '1.6' + # Install an x86_64 build of Julia, and run it under Rosetta 2 emulation + arch: 'x64' steps: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} - arch: ${{ matrix.arch }} + arch: ${{ (matrix.arch == '') && runner.arch || matrix.arch }} - uses: julia-actions/cache@v2 - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 From c0961e8ffdd2b5ada87c732afacdc7611c7553ab Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 17 Mar 2025 14:43:36 +0100 Subject: [PATCH 3/3] CI: limit concurrency for PRs --- .github/workflows/CI.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index bd64ba05..4e31f9f0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -5,6 +5,14 @@ on: branches: - master tags: '*' + +concurrency: + # group by workflow and ref; the last slightly strange component ensures that for pull + # requests, we limit to 1 concurrent job, but for the default repository branch we don't + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref_name != github.event.repository.default_branch || github.run_number }} + # Cancel intermediate builds, but only if it is a pull request build. + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} + jobs: test: name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}