From f04ad5039b922267bd2a5d6bfb703c85ae26fe51 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Fri, 22 Nov 2024 14:13:24 -0500 Subject: [PATCH] ci: add downgrade testing --- .github/workflows/CI.yml | 2 +- .github/workflows/downgrade.yml | 57 +++++++++++++++++++++++++++++++++ Project.toml | 6 ++-- 3 files changed, 61 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/downgrade.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a1adc4e8..955dd697 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -122,7 +122,7 @@ jobs: - uses: codecov/codecov-action@v5 if: steps.run_tests.outcome == 'success' with: - file: lcov.info + files: lcov.info docs: name: Documentation runs-on: ubuntu-latest diff --git a/.github/workflows/downgrade.yml b/.github/workflows/downgrade.yml new file mode 100644 index 00000000..3f03f8d0 --- /dev/null +++ b/.github/workflows/downgrade.yml @@ -0,0 +1,57 @@ +name: Downgrade +on: + pull_request: + branches: + - main + push: + branches: + - main + +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/') }} + +jobs: + downgrade: + # if: ${{ !contains(github.event.head_commit.message, '[skip tests]') && github.base_ref == github.event.repository.default_branch }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + test_group: + - core + - neural_networks + - integration + steps: + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 + with: + version: "1.10" + - uses: julia-actions/julia-downgrade-compat@v1 + with: + skip: "ReactantCore" + - name: "Install Dependencies and Run Tests" + run: | + import Pkg + Pkg.Registry.update() + # Install packages present in subdirectories + dev_pks = Pkg.PackageSpec[] + for path in ("lib/ReactantCore",) + push!(dev_pks, Pkg.PackageSpec(; path)) + end + Pkg.develop(dev_pks) + Pkg.instantiate() + Pkg.test(; coverage="user") + shell: julia --color=yes --code-coverage=user --depwarn=yes --project=. {0} + id: run_tests + env: + JULIA_PKG_SERVER_REGISTRY_PREFERENCE: eager + REACTANT_TEST_GROUP: ${{ matrix.test_group }} + - uses: julia-actions/julia-processcoverage@v1 + if: steps.run_tests.outcome == 'success' + - uses: codecov/codecov-action@v5 + if: steps.run_tests.outcome == 'success' + with: + files: lcov.info diff --git a/Project.toml b/Project.toml index 55519b21..7f3b631f 100644 --- a/Project.toml +++ b/Project.toml @@ -37,10 +37,10 @@ ArrayInterface = "7.10" CEnum = "0.4, 0.5" Downloads = "1.6" Enzyme = "0.13.15" -EnzymeCore = "0.8" -GPUArraysCore = "0.1, 0.2" +EnzymeCore = "0.8.6" +GPUArraysCore = "0.1.6, 0.2" LinearAlgebra = "1.10" -NNlib = "0.9" +NNlib = "0.9.24" OrderedCollections = "1" Preferences = "1.4" ReactantCore = "0.1.2"