|
| 1 | +name: pymake continuous integration |
| 2 | + |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + - cron: '0 7 * * *' # run at 7 AM UTC every day |
| 6 | + push: |
| 7 | + paths-ignore: |
| 8 | + - 'README.md' |
| 9 | + - 'docs/*.md' |
| 10 | + pull_request: |
| 11 | + branches: |
| 12 | + - master |
| 13 | + - develop |
| 14 | + paths-ignore: |
| 15 | + - 'README.md' |
| 16 | + - 'docs/*.md' |
| 17 | +concurrency: |
| 18 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 19 | + cancel-in-progress: true |
| 20 | +jobs: |
| 21 | + |
| 22 | + pymake-os-compiler: |
| 23 | + name: pymake compilers |
| 24 | + runs-on: ${{ matrix.os }} |
| 25 | + strategy: |
| 26 | + fail-fast: false |
| 27 | + matrix: |
| 28 | + include: |
| 29 | + # test latest gcc and python |
| 30 | + - {os: ubuntu-latest, FC: gcc, FC_V: 13} |
| 31 | + - {os: macos-latest, FC: gcc, FC_V: 13} |
| 32 | + - {os: windows-latest, FC: gcc, FC_V: 13} |
| 33 | + # test latest python and intel-classic |
| 34 | + - {os: ubuntu-latest, FC: intel-classic, FC_V: 2021.7} |
| 35 | + - {os: macos-13, FC: intel-classic, FC_V: 2021.7} |
| 36 | + - {os: windows-2019, FC: intel-classic, FC_V: 2021.7} |
| 37 | + # test latest python and previous gcc |
| 38 | + - {os: ubuntu-latest, FC: gcc, FC_V: 12} |
| 39 | + - {os: ubuntu-latest, FC: gcc, FC_V: 11} |
| 40 | + defaults: |
| 41 | + run: |
| 42 | + shell: bash |
| 43 | + |
| 44 | + steps: |
| 45 | + - name: Checkout repo |
| 46 | + uses: actions/checkout@v4 |
| 47 | + |
| 48 | + - uses: maxim-lobanov/setup-xcode@v1 |
| 49 | + if: ${{ (runner.os == 'macOS') && (matrix.FC == 'intel-classic') }} |
| 50 | + with: |
| 51 | + xcode-version: "14.3.1" |
| 52 | + |
| 53 | + - name: Setup Graphviz on Linux |
| 54 | + if: runner.os == 'Linux' |
| 55 | + uses: ts-graphviz/setup-graphviz@v2 |
| 56 | + |
| 57 | + - name: Setup pixi |
| 58 | + uses: prefix-dev/[email protected] |
| 59 | + with: |
| 60 | + pixi-version: v0.19.1 |
| 61 | + manifest-path: "pixi.toml" |
| 62 | + |
| 63 | + - name: pixi post-install |
| 64 | + working-directory: pymake |
| 65 | + run: | |
| 66 | + pixi run postinstall |
| 67 | +
|
| 68 | + - name: Setup ${{ matrix.FC }} ${{ matrix.FC_V }} on ${{ matrix.os }} |
| 69 | + uses: fortran-lang/setup-fortran@main |
| 70 | + with: |
| 71 | + compiler: ${{ matrix.FC }} |
| 72 | + version: ${{ matrix.FC_V }} |
| 73 | + |
| 74 | + - name: Download examples for pytest runs |
| 75 | + run: | |
| 76 | + pixi run download-examples |
| 77 | + |
| 78 | + - name: Install make |
| 79 | + if: runner.os == 'Windows' |
| 80 | + run: choco install make |
| 81 | + |
| 82 | + - name: test on Linux |
| 83 | + if: runner.os == 'Linux' |
| 84 | + run: | |
| 85 | + pixi run autotest |
| 86 | +
|
| 87 | + - name: test on MacOS |
| 88 | + if: runner.os == 'macOS' |
| 89 | + run: | |
| 90 | + pixi run autotest-base |
| 91 | +
|
| 92 | + - name: test on Windows |
| 93 | + if: runner.os == 'Windows' |
| 94 | + shell: pwsh |
| 95 | + run: | |
| 96 | + pixi run autotest-base |
| 97 | +
|
| 98 | + - name: Upload failed test output |
| 99 | + if: failure() |
| 100 | + uses: actions/upload-artifact@v4 |
| 101 | + with: |
| 102 | + name: failed-${{ matrix.os }}-${{ matrix.FC }}-${{ matrix.FC_V }} |
| 103 | + path: ./autotest/.failed |
| 104 | + |
| 105 | + - name: Print coverage report before upload |
| 106 | + run: | |
| 107 | + pixi run coverage-report |
| 108 | + |
| 109 | + - name: Upload coverage to Codecov |
| 110 | + uses: codecov/codecov-action@v4 |
| 111 | + env: |
| 112 | + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
| 113 | + with: |
| 114 | + file: ./autotest/coverage.xml |
| 115 | + |
| 116 | + pymake-schedule: |
| 117 | + name: pymake scheduled |
| 118 | + if: ${{ github.event_name == 'schedule' }} |
| 119 | + runs-on: ${{ matrix.os }} |
| 120 | + strategy: |
| 121 | + fail-fast: false |
| 122 | + matrix: |
| 123 | + include: |
| 124 | + # test latest gcc and python |
| 125 | + - {os: ubuntu-latest, FC: gcc, FC_V: 13} |
| 126 | + - {os: macos-latest, FC: gcc, FC_V: 13} |
| 127 | + - {os: windows-latest, FC: gcc, FC_V: 13} |
| 128 | + # test latest python and intel |
| 129 | + - {os: ubuntu-latest, FC: intel-classic, FC_V: 2021.7} |
| 130 | + - {os: macos-13, FC: intel-classic, FC_V: 2021.7} |
| 131 | + - {os: windows-2019, FC: intel-classic, FC_V: 2021.7} |
| 132 | + defaults: |
| 133 | + run: |
| 134 | + shell: bash |
| 135 | + |
| 136 | + steps: |
| 137 | + - name: Checkout repo |
| 138 | + uses: actions/checkout@v4 |
| 139 | + |
| 140 | + - uses: maxim-lobanov/setup-xcode@v1 |
| 141 | + if: ${{ (runner.os == 'macOS') && (matrix.FC == 'intel-classic') }} |
| 142 | + with: |
| 143 | + xcode-version: "14.3.1" |
| 144 | + |
| 145 | + - name: Setup Graphviz on Linux |
| 146 | + if: runner.os == 'Linux' |
| 147 | + uses: ts-graphviz/setup-graphviz@v2 |
| 148 | + |
| 149 | + - name: Setup pixi |
| 150 | + uses: prefix-dev/[email protected] |
| 151 | + with: |
| 152 | + pixi-version: v0.19.1 |
| 153 | + manifest-path: "pixi.toml" |
| 154 | + |
| 155 | + - name: pixi post-install |
| 156 | + working-directory: pymake |
| 157 | + run: | |
| 158 | + pixi run postinstall |
| 159 | +
|
| 160 | + - name: Setup ${{ matrix.FC }} ${{ matrix.FC_V }} on ${{ matrix.os }} |
| 161 | + uses: fortran-lang/setup-fortran@main |
| 162 | + with: |
| 163 | + compiler: ${{ matrix.FC }} |
| 164 | + version: ${{ matrix.FC_V }} |
| 165 | + |
| 166 | + - name: Install make |
| 167 | + if: runner.os == 'Windows' |
| 168 | + run: choco install make |
| 169 | + |
| 170 | + - name: Run scheduled tests |
| 171 | + run: | |
| 172 | + pixi run autotest-schedule |
| 173 | +
|
| 174 | + - name: Upload failed test output |
| 175 | + if: failure() |
| 176 | + uses: actions/upload-artifact@v4 |
| 177 | + with: |
| 178 | + name: failed-schedule-${{ matrix.os }}-${{ matrix.FC }}-${{ matrix.FC_V }} |
| 179 | + path: ./autotest/.failed |
| 180 | + |
| 181 | + - name: Print coverage report before upload |
| 182 | + run: | |
| 183 | + pixi run coverage-report |
| 184 | + |
| 185 | + - name: Upload coverage to Codecov |
| 186 | + uses: codecov/codecov-action@v4 |
| 187 | + env: |
| 188 | + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
| 189 | + with: |
| 190 | + file: ./autotest/coverage.xml |
| 191 | + |
| 192 | + |
0 commit comments