add downgrade workflow (#134) #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Downgrade | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - 'LICENSE.md' | |
| - 'README.md' | |
| - '.zenodo.json' | |
| - '.github/workflows/CompatHelper.yml' | |
| - '.github/workflows/TagBot.yml' | |
| - 'docs/**' | |
| pull_request: | |
| paths-ignore: | |
| - 'LICENSE.md' | |
| - 'README.md' | |
| - '.zenodo.json' | |
| - '.github/workflows/CompatHelper.yml' | |
| - '.github/workflows/TagBot.yml' | |
| - 'docs/**' | |
| workflow_dispatch: | |
| concurrency: | |
| # Skip intermediate builds: always. | |
| # 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: | |
| downgrade_test: | |
| if: "!contains(github.event.head_commit.message, 'skip ci')" | |
| name: Downgrade - ${{ matrix.trixi_test }} - ${{ matrix.os }} - ${{ matrix.arch }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: | |
| - '1.10' | |
| os: | |
| - ubuntu-latest | |
| arch: | |
| - x64 | |
| trixi_test: | |
| - upstream | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: julia-actions/setup-julia@v2 | |
| with: | |
| version: ${{ matrix.version }} | |
| arch: ${{ matrix.arch }} | |
| - run: julia -e 'using InteractiveUtils; versioninfo(verbose=true)' | |
| - uses: julia-actions/cache@v2 | |
| - uses: julia-actions/julia-downgrade-compat@v2 | |
| with: | |
| skip: LinearAlgebra,Printf,Test | |
| projects: ., test | |
| mode: forcedeps | |
| # We run the tests manually instead of using julia-action/julia-builpkg and julia-action/julia-runtest or `Pkg.test` | |
| # because otherwise the downgraded Manifest.toml is not used in the tests under julia <v1.12 | |
| # see also https://github.com/julia-actions/julia-downgrade-compat/blob/00f940b7be2b50389571ed016d603be561649103/README.md#L89 | |
| - name: Run tests | |
| run: | | |
| julia --project=test --color=yes -e ' | |
| import Pkg | |
| Pkg.develop(Pkg.PackageSpec(path=pwd())) | |
| Pkg.instantiate() | |
| Pkg.status(; mode = Pkg.PKGMODE_MANIFEST) | |
| include("test/runtests.jl") | |
| ' | |
| env: | |
| TRIXI_TEST: ${{ matrix.trixi_test }} |