|
| 1 | +name: CI |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - main |
| 6 | + tags: ['*'] |
| 7 | + pull_request: |
| 8 | + workflow_dispatch: |
| 9 | +concurrency: |
| 10 | + # Skip intermediate builds: always. |
| 11 | + # Cancel intermediate builds: only if it is a pull request build. |
| 12 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 13 | + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} |
| 14 | +jobs: |
| 15 | + test: |
| 16 | + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} |
| 17 | + runs-on: ${{ matrix.os }} |
| 18 | + timeout-minutes: 60 |
| 19 | + permissions: # needed to allow julia-actions/cache to proactively delete old caches that it has created |
| 20 | + actions: write |
| 21 | + contents: read |
| 22 | + strategy: |
| 23 | + fail-fast: false |
| 24 | + matrix: |
| 25 | + version: |
| 26 | + - '1.0' |
| 27 | + - '1.9' |
| 28 | + - 'nightly' |
| 29 | + os: |
| 30 | + - ubuntu-latest |
| 31 | + arch: |
| 32 | + - x64 |
| 33 | + steps: |
| 34 | + - uses: actions/checkout@v4 |
| 35 | + - uses: julia-actions/setup-julia@v1 |
| 36 | + with: |
| 37 | + version: ${{ matrix.version }} |
| 38 | + arch: ${{ matrix.arch }} |
| 39 | + - uses: julia-actions/cache@v1 |
| 40 | + - uses: julia-actions/julia-buildpkg@v1 |
| 41 | + - uses: julia-actions/julia-runtest@v1 |
| 42 | + docs: |
| 43 | + name: Documentation |
| 44 | + runs-on: ubuntu-latest |
| 45 | + permissions: |
| 46 | + actions: write # needed to allow julia-actions/cache to proactively delete old caches that it has created |
| 47 | + contents: write |
| 48 | + statuses: write |
| 49 | + steps: |
| 50 | + - uses: actions/checkout@v4 |
| 51 | + - uses: julia-actions/setup-julia@v1 |
| 52 | + with: |
| 53 | + version: '1' |
| 54 | + - uses: julia-actions/cache@v1 |
| 55 | + - name: Configure doc environment |
| 56 | + shell: julia --project=docs --color=yes {0} |
| 57 | + run: | |
| 58 | + using Pkg |
| 59 | + Pkg.develop(PackageSpec(path=pwd())) |
| 60 | + Pkg.instantiate() |
| 61 | + - uses: julia-actions/julia-buildpkg@v1 |
| 62 | + - uses: julia-actions/julia-docdeploy@v1 |
| 63 | + env: |
| 64 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 65 | + - name: Run doctests |
| 66 | + shell: julia --project=docs --color=yes {0} |
| 67 | + run: | |
| 68 | + using Documenter: DocMeta, doctest |
| 69 | + using FLOWFMM |
| 70 | + DocMeta.setdocmeta!(FLOWFMM, :DocTestSetup, :(using FLOWFMM); recursive=true) |
| 71 | + doctest(FLOWFMM) |
0 commit comments