Merge pull request #3953 from SciML/as/su-v4 #2844
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: "Tests" | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| - 'release-' | |
| - as/su-v4 | |
| paths-ignore: | |
| - 'docs/**' | |
| push: | |
| branches: | |
| - master | |
| paths-ignore: | |
| - 'docs/**' | |
| - 'benchmark/**' | |
| concurrency: | |
| # Skip intermediate builds: always, but for the master branch. | |
| # Cancel intermediate builds: always, but for the master branch. | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} | |
| jobs: | |
| tests: | |
| name: "Tests" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: | |
| - "1" | |
| - "lts" | |
| - "pre" | |
| pkggroup: | |
| - ModelingToolkit/InterfaceI | |
| - ModelingToolkit/InterfaceII | |
| - ModelingToolkit/Initialization | |
| - ModelingToolkit/SymbolicIndexingInterface | |
| - ModelingToolkit/Extensions | |
| - ModelingToolkit/Downstream | |
| - ModelingToolkit/FMI | |
| - ModelingToolkitBase/InterfaceI | |
| - ModelingToolkitBase/InterfaceII | |
| - ModelingToolkitBase/Initialization | |
| - ModelingToolkitBase/SymbolicIndexingInterface | |
| - ModelingToolkitBase/Extended | |
| - ModelingToolkitBase/RegressionI | |
| - ModelingToolkitBase/Extensions | |
| - SciCompDSL/All | |
| runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-latest' }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: "Setup Julia ${{ matrix.version }}" | |
| uses: julia-actions/setup-julia@v2 | |
| with: | |
| version: "${{ matrix.version }}" | |
| arch: "${{ runner.arch }}" | |
| - uses: julia-actions/cache@v2 | |
| if: ${{ vars.USE_SELF_HOSTED != 'true' }} | |
| with: | |
| token: "${{ secrets.GITHUB_TOKEN }}" | |
| - name: "Test ${{ matrix.pkggroup }}" | |
| env: | |
| PKGGROUP: ${{ matrix.pkggroup }} | |
| JULIA_PKG_PRECOMPILE_AUTO: 0 | |
| shell: julia --color=yes --check-bounds=yes --depwarn=yes {0} | |
| run: | | |
| using Pkg | |
| const PKGGROUP = ENV["PKGGROUP"] | |
| const PKG = split(PKGGROUP, "/")[1] | |
| const GROUP = split(PKGGROUP, "/")[2] | |
| ENV["GROUP"] = GROUP | |
| if PKG == "ModelingToolkitBase" | |
| @info "Testing ModelingToolkitBase" | |
| Pkg.activate("lib/ModelingToolkitBase") | |
| @info "`dev`ing SciCompDSL" | |
| Pkg.develop(; path = "lib/SciCompDSL") | |
| @info "Running tests" GROUP | |
| Pkg.test() | |
| elseif PKG == "ModelingToolkit" | |
| @info "Testing ModelingToolkit" | |
| Pkg.activate(".") | |
| @info "`dev`ing ModelingToolkitBase" | |
| Pkg.develop(; path = "lib/ModelingToolkitBase") | |
| @info "`dev`ing SciCompDSL" | |
| Pkg.develop(; path = "lib/SciCompDSL") | |
| @info "Running tests" GROUP | |
| Pkg.test() | |
| elseif PKG == "SciCompDSL" | |
| @info "Testing SciCompDSL" | |
| Pkg.activate("lib/SciCompDSL") | |
| @info "`dev`ing ModelingToolkitBase" | |
| Pkg.develop(; path = "lib/ModelingToolkitBase") | |
| @info "`dev`ing ModelingToolkit" | |
| Pkg.develop(; path = ".") | |
| @info "Running tests" GROUP | |
| Pkg.test() | |
| else | |
| error("Invalid package $PKG") | |
| end | |
| - uses: julia-actions/julia-processcoverage@v1 | |
| with: | |
| directories: "src,ext,lib/ModelingToolkitBase/src,lib/ModelingToolkitBase/ext" | |
| - name: "Report Coverage with Codecov" | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: lcov.info | |
| token: "${{ secrets.CODECOV_TOKEN }}" | |
| fail_ci_if_error: true |