update dependencies #671
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: build | |
| on: | |
| push: | |
| branches: | |
| - master | |
| tags: | |
| - "**" | |
| paths-ignore: | |
| - "**.md" | |
| pull_request: | |
| paths-ignore: | |
| - "**.md" | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: build | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: write | |
| env: | |
| RUNNER_MACHINE: ${{ matrix.os }} # TODO: Is there a built-in env variable? | |
| PYTHONPATH: jimmy | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # available images: https://github.com/actions/runner-images?tab=readme-ov-file#available-images | |
| # "macos-latest" to support ARM based MACs | |
| # "macos-15-intel" to support Intel based MACs | |
| # "ubuntu-22.04" to get the lowest possible glibc version for compatibility | |
| os: ["windows-latest", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-15-intel"] | |
| # build "macos-15-intel" executable only at release | |
| # https://github.com/orgs/community/discussions/26253?sort=top#discussioncomment-3250989 | |
| is_release: | |
| - ${{ startsWith(github.ref, 'refs/tags/v') }} | |
| exclude: | |
| - is_release: false | |
| os: "macos-15-intel" | |
| - is_release: false | |
| os: "ubuntu-latest" | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| # fetch all tags for the "git describe" later | |
| fetch-depth: 0 | |
| submodules: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14.0" | |
| cache: "pip" | |
| cache-dependency-path: "requirements/requirements*.txt" | |
| - name: Install dependencies | |
| # install only the really required modules before the pyinstaller build | |
| run: | | |
| pip install -r requirements/requirements-build.txt | |
| python download_binaries.py | |
| - name: Build executables with pyinstaller | |
| run: | | |
| python -m PyInstaller jimmy.spec | |
| - name: Release | |
| uses: softprops/action-gh-release@v3 | |
| # release only if there is a release tag | |
| if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
| with: | |
| files: | | |
| ./dist/jimmy* | |
| ./bin/copyright.pandoc | |
| - name: Check executable size | |
| shell: bash | |
| run: ls -lh ./dist | |
| - name: Setup bats and bats libs | |
| uses: bats-core/bats-action@4.0.0 | |
| with: | |
| # workaround for macos, see https://github.com/bats-core/bats-action/issues/57#issuecomment-4004063838 | |
| support-path: "${{ github.workspace }}/tests/bats-support" | |
| assert-path: "${{ github.workspace }}/tests/bats-assert" | |
| detik-path: "${{ github.workspace }}/tests/bats-detik" | |
| file-path: "${{ github.workspace }}/tests/bats-file" | |
| - name: Smoke test | |
| shell: bash | |
| working-directory: ./test # run in a different directory to make sure that the paths are working | |
| run: bats smoke-test.bats --timing | |
| # - name: Scan for viruses (just for information) | |
| # if: runner.os == 'Linux' | |
| # run: | | |
| # sudo apt install -y clamav | |
| # clamscan ./dist/jimmy* |