From 66020f663e2ae72845387bffd4236b055070b826 Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Thu, 23 Jan 2025 10:59:18 +0000 Subject: [PATCH] Update CI setup --- .github/workflows/ci.yml | 87 ++++++++++++++++++++++------------------ 1 file changed, 49 insertions(+), 38 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 965f998a..4d1b7b04 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,58 +6,69 @@ on: - master pull_request: +# 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 }} - ${{ github.event_name }} - runs-on: ${{ matrix.os }} - continue-on-error: ${{ matrix.version == 'nightly' }} + name: Julia ${{ matrix.runner.version }} - ${{ matrix.runner.os }} - ${{ matrix.runner.arch }} - ${{ github.event_name }} + runs-on: ${{ matrix.runner.os }} strategy: + fail-fast: false matrix: - version: - - '1.7' - - '1' - - 'nightly' - os: - - ubuntu-latest - - macOS-latest - - windows-latest - arch: - - x64 - - x86 - exclude: - - os: macOS-latest + runner: + # Default + - version: '1' + os: ubuntu-latest + arch: x64 + num_threads: 1 + # x86 + - version: '1' + os: ubuntu-latest arch: x86 - include: + num_threads: 1 + # Multithreaded + - version: '1' + os: ubuntu-latest + arch: x64 + num_threads: 2 + # Windows + - version: '1' + os: windows-latest + arch: x64 + num_threads: 1 + # macOS - version: '1' + os: macos-latest + arch: aarch64 + num_threads: 1 + # Minimum supported Julia version + - version: 'min' os: ubuntu-latest arch: x64 - coverage: true + num_threads: 1 + # Pre-release Julia version + - version: 'pre' + os: ubuntu-latest + arch: x64 + num_threads: 1 steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 - with: - version: ${{ matrix.version }} - arch: ${{ matrix.arch }} - - uses: actions/cache@v1 - env: - cache-name: cache-artifacts + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 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 }}- + version: ${{ matrix.runner.version }} + arch: ${{ matrix.runner.arch }} + - uses: julia-actions/cache@v2 - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 - if: matrix.coverage - - uses: codecov/codecov-action@v1 - if: matrix.coverage + - uses: codecov/codecov-action@v5 with: - file: lcov.info - - uses: coverallsapp/github-action@master - if: matrix.coverage + files: lcov.info + token: ${{ secrets.CODECOV_TOKEN }} + - uses: coverallsapp/github-action@v2 with: github-token: ${{ secrets.GITHUB_TOKEN }} path-to-lcov: lcov.info