autopush #2
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: Test macos15 build | |
| on: | |
| push: | |
| # Allow manual triggering | |
| workflow_dispatch: | |
| jobs: | |
| generate-secret: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: ['macos-15'] | |
| python-version: ['3.14'] | |
| gcc-version: ['12'] | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v3 | |
| with: | |
| submodules: 'true' | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - uses: actions/cache@v3 | |
| id: cache-virtualenv | |
| with: | |
| path: ${{ env.pythonLocation }} | |
| key: ${{ env.pythonLocation }}-2-${{ hashFiles('pyproject.toml') }}-${{ matrix.os }}-${{ matrix.python-version }} | |
| - name: Install Fortran compiler on macOS | |
| run: | | |
| brew install gcc@${{ matrix.gcc-version }} | |
| echo "FC=gfortran-${{ matrix.gcc-version }}" >> "$GITHUB_ENV" | |
| echo "CC=gcc-${{ matrix.gcc-version }}" >> "$GITHUB_ENV" | |
| - name: Install dependencies | |
| if: steps.cache-virtualenv.outputs.cache-hit != 'true' | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e .[develop] | |
| - name: Train the ResNet | |
| run: | | |
| python examples/example_train.py tests/test_data/conf_resnet.yaml | |
| python examples/example_post.py tests/test_data/conf_resnet.yaml | |
| - name: Upload ResNet results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ResNet-results-${{ matrix.python-version }}-${{ matrix.os }} | |
| path: tests/test_data/speckles/Model_test_resnet_score | |
| retention-days: 31 | |
| - name: Upload ResNet weights | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ResNet-weights-${{ matrix.python-version }}-${{ matrix.os }} | |
| path: tests/test_data/speckles/Model_test_resnet_states | |
| retention-days: 31 | |
| - name: Train the SCNN | |
| run: | | |
| python examples/example_train.py tests/test_data/conf_scnn.yaml | |
| python examples/example_post.py tests/test_data/conf_scnn.yaml | |
| - name: Upload SCNN results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: SCNN-results-${{ matrix.python-version }}-${{ matrix.os }} | |
| path: tests/test_data/speckles/Model_test_scnn_score | |
| retention-days: 31 | |
| - name: Upload SCNN weights | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: SCNN-weights-${{ matrix.python-version }}-${{ matrix.os }} | |
| path: tests/test_data/speckles/Model_test_scnn_states | |
| retention-days: 31 |