Skip to content

Commit

Permalink
Update downgrade dependency compat step (#66)
Browse files Browse the repository at this point in the history
* Merge downgrade step with CI workflow

* Use actions

* Test docs build with downgrade compat

* Remove unnecessary environment variable

* Use julia cache
  • Loading branch information
sethaxen authored Mar 4, 2024
1 parent 7fc54fc commit d9ce2f2
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 49 deletions.
54 changes: 29 additions & 25 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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/[email protected]
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
24 changes: 0 additions & 24 deletions .github/workflows/DowngradeCI.yml

This file was deleted.

0 comments on commit d9ce2f2

Please sign in to comment.