Deduplicate ci.yml from #795 #262
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: CI | ||
|
Check failure on line 1 in .github/workflows/ci.yml
|
||
| on: | ||
| # See: https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request. | ||
| pull_request: | ||
| # See: https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#push. | ||
| push: | ||
| branches: | ||
| - '**' | ||
| tags-ignore: | ||
| - '**' | ||
| concurrency: | ||
| group: ${{ github.event_name != 'pull_request' && github.run_id || github.ref }} | ||
| cancel-in-progress: true | ||
| env: | ||
| LC_ALL: 'C.UTF-8' | ||
| LANG: 'C.UTF-8' | ||
| LANGUAGE: 'C.UTF-8' | ||
| jobs: | ||
| non-device-tests: | ||
| name: Non-device tests | ||
| runs-on: ubuntu-latest | ||
| container: python:3.12 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - run: | | ||
| pip install poetry | ||
| poetry install | ||
| - name: Run tests | ||
| run: | | ||
| cd test; poetry run ./run_tests.py; cd .. | ||
| lint: | ||
| name: lint | ||
| runs-on: ubuntu-latest | ||
| container: python:3.12 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - run: | | ||
| pip install poetry | ||
| poetry install | ||
| - run: | | ||
| poetry run flake8 | ||
| wine-builder: | ||
| name: Wine builder | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: docker/build-push-action@v6 | ||
| with: | ||
| context: . | ||
| file: contrib/build-wine.Dockerfile | ||
| tags: build-wine-container | ||
| load: true | ||
| - run: > | ||
| docker run --rm \ | ||
| --volume ${{ github.workspace }}:${{ github.workspace }} \ | ||
| --workdir ${{ github.workspace }} \ | ||
| build-wine-container bash -c " | ||
| git config --global --add safe.directory ${{ github.workspace }} | ||
| contrib/build_wine.sh | ||
| find dist -type f -exec sha256sum {} \; | ||
| " | ||
| dist-builder: | ||
| name: Dist builder | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: docker/build-push-action@v6 | ||
| with: | ||
| context: . | ||
| file: contrib/build.Dockerfile | ||
| tags: build-container | ||
| load: true | ||
| - run: > | ||
| docker run --rm \ | ||
| --volume ${{ github.workspace }}:${{ github.workspace }} \ | ||
| --workdir ${{ github.workspace }} \ | ||
| build-container bash -c " | ||
| git config --global --add safe.directory ${{ github.workspace }} | ||
| contrib/build_bin.sh | ||
| contrib/build_dist.sh | ||
| find dist -type f -exec sha256sum {} \; | ||
| " | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: dist | ||
| path: dist/ | ||
| sim-builders: | ||
| uses: ./.github/workflows/sim-builder.yml | ||
| bitcoind-builder: | ||
| name: bitcoind builder | ||
| # Ubuntu 22.04 ships with glibc 2.35, which is needed to keep binaries | ||
| # compatible with Debian Bookworm (glibc 2.36) Python containers. | ||
| runs-on: ubuntu-22.04 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: ./.github/actions/build-bitcoind | ||
| test-trezor: | ||
| uses: ./.github/workflows/device-test.yml | ||
| needs: [sim-builder-trezor, bitcoind-builder, dist-builder] | ||
| with: | ||
| device: trezor | ||
| runs-on: ubuntu-latest | ||
| test-ledger-s: | ||
| uses: ./.github/workflows/device-test.yml | ||
| needs: [sim-builder-ledger, ledger-s-app-builder, bitcoind-builder] | ||
| with: | ||
| device: ledger-legacy | ||
| runs-on: ubuntu-latest | ||
| test-ledger-x: | ||
| uses: ./.github/workflows/device-test.yml | ||
| needs: [sim-builder-ledger, ledger-x-app-builder, bitcoind-builder] | ||
| with: | ||
| device: ledger | ||
| runs-on: ubuntu-latest | ||
| test-coldcard: | ||
| uses: ./.github/workflows/device-test.yml | ||
| needs: [sim-builder-coldcard, bitcoind-builder] | ||
| with: | ||
| device: coldcard | ||
| runs-on: ubuntu-22.04 | ||
| test-bitbox01: | ||
| uses: ./.github/workflows/device-test.yml | ||
| needs: [sim-builder-bitbox, bitcoind-builder] | ||
| with: | ||
| device: bitbox01 | ||
| runs-on: ubuntu-latest | ||
| test-bitbox02: | ||
| uses: ./.github/workflows/device-test.yml | ||
| needs: [sim-builder-bitbox, bitcoind-builder] | ||
| with: | ||
| device: bitbox02 | ||
| runs-on: ubuntu-latest | ||
| test-jade: | ||
| uses: ./.github/workflows/device-test.yml | ||
| needs: [sim-builder-jade, bitcoind-builder] | ||
| with: | ||
| device: jade | ||
| runs-on: ubuntu-latest | ||
| test-keepkey: | ||
| uses: ./.github/workflows/device-test.yml | ||
| needs: [sim-builder-keepkey, bitcoind-builder] | ||
| with: | ||
| device: keepkey | ||
| runs-on: ubuntu-latest | ||