Skip to content

Commit

Permalink
ci: use build matrix for building and caching stable packages as well
Browse files Browse the repository at this point in the history
  • Loading branch information
lilyinstarlight committed May 31, 2024
1 parent 9eaa30e commit de03b86
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 21 deletions.
6 changes: 4 additions & 2 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ pull_request_rules:
- author=github-actions[bot]
- label=dependencies

- check-success=Build - x86_64-linux
- check-success=Build - aarch64-linux
- check-success=Build - x86_64-linux - vm.closure
- check-success=Build - aarch64-linux - vm.closure
- check-success=Build - x86_64-linux - vm-stable.closure
- check-success=Build - aarch64-linux - vm-stable.closure
actions:
merge:
method: squash
Expand Down
38 changes: 19 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,22 @@ on:
workflow_dispatch:

jobs:
build_x86_64_linux:
name: Build - x86_64-linux
runs-on: [linux, X64, drakon64/github-actions-runner-aws, EC2-r7i.large, EBS-30GB]
build:
strategy:
matrix:
architecture:
- system: x86_64-linux
runner: [linux, X64, drakon64/github-actions-runner-aws, EC2-r7i.large, EBS-30GB]
- system: aarch64-linux
runner: [linux, ARM64, drakon64/github-actions-runner-aws, EC2-r7g.large, EBS-30GB]
attribute:
- vm.closure
- vm-stable.closure

name: Build - ${{ matrix.architecture.system }} - ${{ matrix.attribute }}
runs-on: ${{ matrix.architecture.runner }}
timeout-minutes: 1440
steps:
- uses: actions/checkout@v4

- uses: DeterminateSystems/nix-installer-action@v11

- uses: cachix/cachix-action@v15
with:
name: cosmic
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}

- run: nix -vL build --show-trace --cores 1 --max-jobs 1 .#vm.closure

build_aarch64_linux:
name: Build - aarch64-linux
runs-on: [linux, ARM64, drakon64/github-actions-runner-aws, EC2-r7g.large, EBS-30GB]
timeout-minutes: 1440
steps:
- uses: actions/checkout@v4

Expand All @@ -38,4 +34,8 @@ jobs:
name: cosmic
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}

- run: nix -vL build --show-trace --cores 1 --max-jobs 1 .#vm.closure
- env:
SYSTEM: ${{ matrix.architecture.system }}
ATTRIBUTE: ${{ matrix.attribute }}
run: |
nix -vL build --show-trace --cores 1 --max-jobs 1 --system "$SYSTEM" ".#$ATTRIBUTE"

0 comments on commit de03b86

Please sign in to comment.