Refactor into a generic test module #6161
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: CI | ||
|
Check failure on line 1 in .github/workflows/ci.yml
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| - release-* | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] | ||
| 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: | ||
| test: | ||
| name: Julia ${{ matrix.machine.version }} - ${{ matrix.machine.os }}-${{ matrix.machine.arch }} - ${{ matrix.moi_test_modules }} | ||
| runs-on: ${{ matrix.machine.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| moi_test_modules: | ||
| - 'General;Benchmarks;FileFormats;Nonlinear' | ||
| - 'Bridges/General' | ||
| - 'Bridges/Constraint' | ||
| - 'Bridges/Objective;Bridges/Variable' | ||
| - 'Test' | ||
| - 'Utilities' | ||
| machine: | ||
| - version: 'nightly' | ||
| os: ubuntu-latest | ||
| arch: x64 | ||
| downgrade: false | ||
| depwarn: yes | ||
| - version: '1' | ||
| os: windows-latest | ||
| arch: x64 | ||
| downgrade: false | ||
| depwarn: error | ||
| - version: '1.10' | ||
| os: ubuntu-latest | ||
| arch: x64 | ||
| downgrade: true | ||
| depwarn: error | ||
| - version: '1' | ||
| os: ubuntu-latest | ||
| arch: x86 | ||
| downgrade: false | ||
| depwarn: error | ||
| include: | ||
| - moi_test_modules: 'JuliaCI' | ||
| machine: | ||
| version: '1' | ||
| os: ubuntu-latest | ||
| arch: default | ||
| downgrade: false | ||
| depwarn: yes | ||
| steps: | ||
| - uses: actions/checkout@v7 | ||
| - uses: julia-actions/setup-julia@v3 | ||
| with: | ||
| version: ${{ matrix.machine.version }} | ||
| arch: ${{ matrix.machine.arch }} | ||
| - uses: julia-actions/cache@v3 | ||
| - if: ${{ matrix.machine.downgrade }} | ||
| uses: julia-actions/julia-downgrade-compat@v2 | ||
| with: | ||
| mode: deps | ||
| - uses: julia-actions/julia-buildpkg@v1 | ||
| - if: ${{ contains(moi_test_modules, 'JuliaC') }} | ||
| # Instantiate MyApp/Project.toml iff we are running the JuliaC tests | ||
| shell: julia --color=yes --project=test/JuliaC/MyApp {0} | ||
| run: | | ||
| using Pkg | ||
| Pkg.develop(PackageSpec(path=pwd())) | ||
| Pkg.instantiate() | ||
| - uses: julia-actions/julia-runtest@v1 | ||
| with: | ||
| depwarn: ${{ matrix.machine.depwarn }} | ||
| allow_reresolve: ${{ !matrix.machine.downgrade }} | ||
| force_latest_compatible_version: ${{ !matrix.machine.downgrade }} | ||
| env: | ||
| MOI_TEST_MODULES: ${{ matrix.moi_test_modules }} | ||
| - uses: julia-actions/julia-processcoverage@v1 | ||
| - uses: codecov/codecov-action@v7 | ||
| with: | ||
| files: lcov.info | ||
| token: ${{ secrets.CODECOV_TOKEN }} | ||