Bump actions/checkout from 4 to 5 in the actions group #104
Workflow file for this run
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: Construct | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }} | |
| cancel-in-progress: true | |
| on: # yamllint disable-line rule:truthy | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - '*' | |
| pull_request: | |
| branches: | |
| - main | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| env: | |
| PROJECT_NAME: "Scientific-Python" | |
| jobs: | |
| # Build installers | |
| build_macos: | |
| name: Build (${{ matrix.os }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos-13, macos-14] # Intel and Apple Silicon, respectively | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| GITHUB_EVENT_NAME: ${{ github.event_name }} | |
| defaults: | |
| run: | |
| shell: bash -el {0} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: mamba-org/setup-micromamba@v2 | |
| with: | |
| environment-file: environment.yml | |
| - run: ./tools/extract_version.sh | |
| - run: ./tools/macos_install_certificates.sh | |
| if: ${{ github.event_name != 'pull_request' }} | |
| env: | |
| APPLICATION_CERT_BASE64: ${{ secrets.APPLE_APPLICATION_CERT_BASE64 }} | |
| APPLICATION_CERT_PASSWORD: ${{ secrets.APPLE_APPLICATION_CERT_PASSWORD }} | |
| INSTALLER_CERT_BASE64: ${{ secrets.APPLE_INSTALLER_CERT_BASE64 }} | |
| INSTALLER_CERT_PASSWORD: ${{ secrets.APPLE_INSTALLER_CERT_PASSWORD }} | |
| KEYCHAIN_PASSWORD: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }} | |
| - name: Patch config (non-PR) | |
| if: ${{ github.event_name != 'pull_request' }} | |
| run: | | |
| # Replace a set of _name variables (that have # [osx] comments with | |
| # an particular string (is this the certificate ID?) | |
| sed -i "" "s/_name: *# \[osx\]/_name: 9779L28NP8 # \[osx\]/" ${RECIPE_DIR}/construct.yaml | |
| - run: conda-build sp-installer-menu --no-anaconda-upload --croot conda-bld | |
| - run: ./tools/run_constructor.sh | |
| timeout-minutes: 20 | |
| - run: ./tools/macos_check_installer_signature.sh | |
| - run: ./tools/macos_notarize_installer.sh | |
| if: ${{ github.event_name != 'pull_request' }} | |
| env: | |
| APPLE_ID: ${{ secrets.APPLE_ID }} | |
| APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} | |
| APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
| - run: ./tools/calculate_installer_hash.sh | |
| - run: | | |
| installer -verbose -pkginfo -pkg ./${PKG_INSTALLER_NAME} | |
| installer -verbose -dominfo -pkg ./${PKG_INSTALLER_NAME} | |
| installer -verbose -volinfo -pkg ./${PKG_INSTALLER_NAME} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.PKG_INSTALLER_ARTIFACT_ID }} | |
| path: ${{ env.PROJECT_NAME }}-*.* | |
| retention-days: ${{ env.ARTIFACT_RETENTION_DAYS }} | |
| build_linux: | |
| name: Build (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest] | |
| defaults: | |
| run: | |
| shell: bash -el {0} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: mamba-org/setup-micromamba@v2 | |
| with: | |
| environment-file: environment.yml | |
| - run: ./tools/extract_version.sh | |
| - run: conda-build sp-installer-menu --no-anaconda-upload --croot conda-bld | |
| - run: ./tools/run_constructor.sh | |
| timeout-minutes: 20 | |
| - run: ./tools/calculate_installer_hash.sh | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.PKG_INSTALLER_ARTIFACT_ID }} | |
| path: ${{ env.PROJECT_NAME }}-*.* | |
| retention-days: ${{ env.ARTIFACT_RETENTION_DAYS }} | |
| build_windows: | |
| name: Build (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows-2022] | |
| defaults: | |
| run: | |
| shell: bash -el {0} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: mamba-org/setup-micromamba@v2 | |
| with: | |
| environment-file: environment.yml | |
| # https://nsis.sourceforge.io/Download | |
| - run: conda install -c conda-forge -y "nsis==3.08" | |
| - run: ./tools/extract_version.sh | |
| - run: conda-build sp-installer-menu --no-test --no-anaconda-upload --croot conda-bld | |
| - run: ./tools/run_constructor.sh | |
| timeout-minutes: 20 | |
| - run: ./tools/calculate_installer_hash.sh | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.PKG_INSTALLER_ARTIFACT_ID }} | |
| path: ${{ env.PROJECT_NAME }}-*.* | |
| retention-days: ${{ env.ARTIFACT_RETENTION_DAYS }} | |
| # Test | |
| test_macos: | |
| name: Test (${{ matrix.os }}) | |
| needs: [build_macos] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos-13, macos-14] | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash -el {0} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| # The macos-14 runner doesn't come equipped with Python, so we need to install it | |
| # there. | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| if: ${{ matrix.os == 'macos-14' }} | |
| - run: ./tools/extract_version.sh | |
| - uses: actions/download-artifact@v5 | |
| with: | |
| name: ${{ env.PKG_INSTALLER_ARTIFACT_ID }} | |
| - name: Run installer | |
| run: | | |
| sudo installer -verbose -pkg ${PKG_INSTALLER_NAME} -target / \ | |
| || ( tail -n 30 /var/log/install.log && exit 1 ) # display last log messages on error | |
| # Check the list of packages that were actually installed by the installer. | |
| - run: ./tools/export_frozen_env_def.sh | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.PKG_INSTALLER_ARTIFACT_ID }}-json | |
| path: ${{ env.PROJECT_NAME }}-*.env.json | |
| # upload just one for each installer version | |
| if: matrix.os == 'macos-13' || matrix.os == 'macos-14' | |
| - uses: pyvista/setup-headless-display-action@main | |
| with: | |
| qt: true | |
| pyvista: false | |
| wm: false | |
| # Checking architecture is correct, files went to correct directories, | |
| # checks packages via JSON file above ... | |
| - run: ./tools/check_installation.sh | |
| test_linux: | |
| name: Test (${{ matrix.os }}) | |
| needs: [build_linux] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-22.04, ubuntu-24.04] | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash -el {0} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - run: ./tools/extract_version.sh | |
| - uses: actions/download-artifact@v5 | |
| with: | |
| name: ${{ env.PKG_INSTALLER_ARTIFACT_ID }} | |
| - run: sh ./${PKG_INSTALLER_NAME} -b | |
| - run: ./tools/export_frozen_env_def.sh | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.PKG_INSTALLER_ARTIFACT_ID }}-json | |
| path: ${{ env.PROJECT_NAME }}-*.env.json | |
| # upload just one for each installer version | |
| if: matrix.os == 'ubuntu-24.04' | |
| - uses: pyvista/setup-headless-display-action@main | |
| with: | |
| qt: true | |
| pyvista: false | |
| wm: false | |
| - run: ./tools/check_installation.sh | |
| test_windows: | |
| needs: [build_windows] | |
| name: Test (${{ matrix.os }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows-2022, windows-2025] | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash -el {0} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - run: ./tools/extract_version.sh | |
| - uses: actions/download-artifact@v5 | |
| with: | |
| name: ${{ env.PKG_INSTALLER_ARTIFACT_ID }} | |
| # https://docs.anaconda.com/anaconda/install/silent-mode.html#windows | |
| - run: .\%PKG_INSTALLER_NAME% /S /InstallationType=JustMe /AddToPath=1 | |
| timeout-minutes: 30 | |
| shell: cmd | |
| - run: ./tools/export_frozen_env_def.sh | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.PKG_INSTALLER_ARTIFACT_ID }}-json | |
| path: ${{ env.PROJECT_NAME}}-*.env.json | |
| # upload just one for each installer version | |
| if: matrix.os == 'windows-2022' | |
| - uses: pyvista/setup-headless-display-action@main | |
| with: | |
| qt: true | |
| pyvista: false | |
| wm: false | |
| - run: ./tools/check_installation.sh | |
| timeout-minutes: 5 # < 2 min even on Windows | |
| # Release | |
| release: | |
| name: Release | |
| needs: [build_macos, build_linux, build_windows, test_macos, test_linux, test_windows] | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash -el {0} | |
| steps: | |
| # These names should correspond to PKG_INSTALLER_ARTIFACT_ID in tools/extract_version.sh | |
| - uses: actions/download-artifact@v5 | |
| with: | |
| pattern: ${{ env.PROJECT_NAME }}-* | |
| merge-multiple: true | |
| - run: ls -al ./ | |
| - uses: ncipollo/release-action@v1 | |
| with: | |
| artifacts: "${{ env.PROJECT_NAME }}-*.*" | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| draft: true | |
| prerelease: true | |
| allowUpdates: true | |
| generateReleaseNotes: true | |
| if: github.ref_type == 'tag' |