From d9ce2f258707ad189fe268f1d011afd3dc98b8f1 Mon Sep 17 00:00:00 2001 From: Seth Axen Date: Mon, 4 Mar 2024 20:48:16 +0100 Subject: [PATCH] Update downgrade dependency compat step (#66) * Merge downgrade step with CI workflow * Use actions * Test docs build with downgrade compat * Remove unnecessary environment variable * Use julia cache --- .github/workflows/CI.yml | 54 +++++++++++++++++-------------- .github/workflows/DowngradeCI.yml | 24 -------------- 2 files changed, 29 insertions(+), 49 deletions(-) delete mode 100644 .github/workflows/DowngradeCI.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 64eb0c4b..3f46151f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -9,7 +9,7 @@ on: jobs: test: - name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ matrix.num_threads }} threads - ${{ github.event_name }} + name: ${{ matrix.downgrade && 'Downgrade / ' || '' }}Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ matrix.num_threads }} threads - ${{ github.event_name }} runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -24,22 +24,24 @@ jobs: num_threads: - 1 - 2 + downgrade: [false] + include: + - version: '1.6' + os: ubuntu-latest + arch: x64 + num_threads: 1 + downgrade: true steps: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v1 with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - - uses: actions/cache@v4 - env: - cache-name: cache-artifacts + - uses: julia-actions/cache@v1 + - uses: julia-actions/julia-downgrade-compat@v1 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 }}- + skip: LinearAlgebra,Printf,Statistics + if: matrix.downgrade - uses: julia-actions/julia-buildpkg@latest - uses: julia-actions/julia-runtest@latest env: @@ -49,27 +51,29 @@ jobs: with: file: lcov.info docs: - name: Documentation + name: ${{ matrix.downgrade && 'Downgrade / ' || '' }}Documentation - Julia ${{ matrix.version }} runs-on: ubuntu-latest + strategy: + matrix: + include: + - version: '1' + downgrade: false + - version: '1.6' + downgrade: true steps: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v1 with: version: '1' - - run: | - julia --project=docs -e ' - using Pkg - Pkg.develop(PackageSpec(path=pwd())) - Pkg.instantiate()' - - run: | - julia --project=docs -e ' - using Documenter: DocMeta, doctest - using PSIS - DocMeta.setdocmeta!(PSIS, :DocTestSetup, :(using PSIS); recursive=true) - doctest(PSIS)' - - run: julia --project=docs docs/make.jl + - uses: julia-actions/cache@v1 + - uses: julia-actions/julia-downgrade-compat@v1.1 + with: + skip: LinearAlgebra,Printf,PSIS,Statistics + projects: ., docs + if: matrix.downgrade + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-docdeploy@v1 env: - JULIA_PKG_SERVER: "" GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} + DOCUMENTER_KEY: ${{ matrix.version == '1' && secrets.DOCUMENTER_KEY || '' }} GKSwstype: "100" # https://discourse.julialang.org/t/generation-of-documentation-fails-qt-qpa-xcb-could-not-connect-to-display/60988 diff --git a/.github/workflows/DowngradeCI.yml b/.github/workflows/DowngradeCI.yml deleted file mode 100644 index 20017e8a..00000000 --- a/.github/workflows/DowngradeCI.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: DowngradeCI -on: - pull_request: - branches: - - main - push: - branches: - - main -jobs: - test: - runs-on: ubuntu-latest - strategy: - matrix: - version: ['1'] - steps: - - uses: actions/checkout@v4 - - uses: julia-actions/setup-julia@v1 - with: - version: ${{ matrix.version }} - - uses: cjdoris/julia-downgrade-compat-action@v1 - with: - skip: LinearAlgebra,Printf,Statistics - - uses: julia-actions/julia-buildpkg@v1 - - uses: julia-actions/julia-runtest@v1