|
12 | 12 | schedule: |
13 | 13 | # Run weekly at 3 AM UTC on Sunday on the default branch |
14 | 14 | - cron: '0 3 * * 0' |
| 15 | + workflow_dispatch: |
| 16 | + inputs: |
| 17 | + hosts: |
| 18 | + description: 'Host triplet to build (single host)' |
| 19 | + required: false |
| 20 | + default: 'x86_64-linux-gnu' |
| 21 | + platform_gui: |
| 22 | + description: 'Build with PLATFORM_GUI=1 (Platform GUI + vendored Rust crates)' |
| 23 | + type: boolean |
| 24 | + required: false |
| 25 | + default: false |
15 | 26 |
|
16 | 27 | jobs: |
17 | 28 | build-image: |
18 | 29 | runs-on: ubuntu-24.04-arm |
19 | 30 | if: | |
20 | 31 | (github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || vars.RUN_GUIX_ON_ALL_PUSH == 'true')) || |
21 | 32 | contains(github.event.pull_request.labels.*.name, 'guix-build') || |
22 | | - github.event_name == 'schedule' |
| 33 | + github.event_name == 'schedule' || |
| 34 | + github.event_name == 'workflow_dispatch' |
23 | 35 | outputs: |
24 | 36 | image-tag: ${{ steps.prepare.outputs.image-tag }} |
25 | 37 | repo-name: ${{ steps.prepare.outputs.repo-name }} |
|
77 | 89 | runs-on: ubuntu-24.04-arm |
78 | 90 | strategy: |
79 | 91 | matrix: |
80 | | - build_target: [x86_64-linux-gnu, aarch64-linux-gnu, riscv64-linux-gnu, powerpc64-linux-gnu, x86_64-w64-mingw32, x86_64-apple-darwin, arm64-apple-darwin] |
| 92 | + build_target: ${{ github.event_name == 'workflow_dispatch' && fromJSON(format('["{0}"]', inputs.hosts)) || fromJSON('["x86_64-linux-gnu", "aarch64-linux-gnu", "riscv64-linux-gnu", "powerpc64-linux-gnu", "x86_64-w64-mingw32", "x86_64-apple-darwin", "arm64-apple-darwin"]') }} |
81 | 93 |
|
82 | 94 | timeout-minutes: 480 |
83 | 95 | steps: |
|
98 | 110 | uses: actions/cache@v5 |
99 | 111 | with: |
100 | 112 | path: dash/depends/sources |
101 | | - key: depends-sources-${{ hashFiles('dash/depends/packages/*') }} |
| 113 | + key: depends-sources-${{ hashFiles('dash/depends/packages/*', 'dash/depends/patches/platform_cxx/cargo-config.toml') }} |
102 | 114 | restore-keys: | |
103 | 115 | depends-sources- |
104 | 116 |
|
@@ -129,7 +141,7 @@ jobs: |
129 | 141 | -v ${{ github.workspace }}/.cache:/home/ubuntu/.cache \ |
130 | 142 | -w /src/dash \ |
131 | 143 | ghcr.io/${{ needs.build-image.outputs.repo-name }}/dashcore-guix-builder:${{ needs.build-image.outputs.image-tag }} && \ |
132 | | - docker exec guix-daemon bash -c 'HOSTS=${{ matrix.build_target }} /usr/local/bin/guix-start /src/dash' |
| 144 | + docker exec guix-daemon bash -c 'HOSTS=${{ matrix.build_target }} PLATFORM_GUI=${{ inputs.platform_gui && '1' || '' }} /usr/local/bin/guix-start /src/dash' |
133 | 145 |
|
134 | 146 | - name: Ensure build passes |
135 | 147 | run: | |
|
0 commit comments