mirror of
https://github.com/NixOS/nix
synced 2025-07-07 10:11:47 +02:00
Merge pull request #31 from DeterminateSystems/fix-gha
Improve GitHub CI
This commit is contained in:
commit
90d9a81203
3 changed files with 80 additions and 16 deletions
21
.github/workflows/build.yml
vendored
Normal file
21
.github/workflows/build.yml
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
os:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
runs-on: ${{ inputs.os }}
|
||||||
|
timeout-minutes: 60
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: DeterminateSystems/nix-installer-action@main
|
||||||
|
with:
|
||||||
|
flakehub: true
|
||||||
|
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||||
|
- run: nix build
|
54
.github/workflows/ci.yml
vendored
54
.github/workflows/ci.yml
vendored
|
@ -3,6 +3,10 @@ name: "CI"
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
|
branches:
|
||||||
|
- detsys-main
|
||||||
|
- main
|
||||||
|
- master
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
id-token: "write"
|
id-token: "write"
|
||||||
|
@ -10,23 +14,41 @@ permissions:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
tests:
|
build_x86_64-linux:
|
||||||
strategy:
|
uses: ./.github/workflows/build.yml
|
||||||
fail-fast: false
|
with:
|
||||||
matrix:
|
os: UbuntuLatest32Cores128G
|
||||||
os: [ubuntu-latest, macos-latest]
|
|
||||||
runs-on: ${{ matrix.os }}
|
build_aarch64-linux:
|
||||||
timeout-minutes: 60
|
uses: ./.github/workflows/build.yml
|
||||||
steps:
|
with:
|
||||||
- uses: actions/checkout@v4
|
os: UbuntuLatest32Cores128GArm
|
||||||
- uses: DeterminateSystems/nix-installer-action@main
|
|
||||||
with:
|
build_aarch64-darwin:
|
||||||
flakehub: true
|
uses: ./.github/workflows/build.yml
|
||||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
with:
|
||||||
- run: nix flake check -L
|
os: macos-latest
|
||||||
|
|
||||||
|
test_x86_64-linux:
|
||||||
|
uses: ./.github/workflows/test.yml
|
||||||
|
needs: build_x86_64-linux
|
||||||
|
with:
|
||||||
|
os: UbuntuLatest32Cores128G
|
||||||
|
|
||||||
|
test_aarch64-linux:
|
||||||
|
uses: ./.github/workflows/test.yml
|
||||||
|
needs: build_aarch64-linux
|
||||||
|
with:
|
||||||
|
os: UbuntuLatest32Cores128GArm
|
||||||
|
|
||||||
|
test_aarch64-darwin:
|
||||||
|
uses: ./.github/workflows/test.yml
|
||||||
|
needs: build_aarch64-darwin
|
||||||
|
with:
|
||||||
|
os: macos-latest
|
||||||
|
|
||||||
vm_tests:
|
vm_tests:
|
||||||
needs: tests
|
needs: build_x86_64-linux
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
@ -37,7 +59,7 @@ jobs:
|
||||||
- run: nix build -L .#hydraJobs.tests.githubFlakes .#hydraJobs.tests.tarballFlakes
|
- run: nix build -L .#hydraJobs.tests.githubFlakes .#hydraJobs.tests.tarballFlakes
|
||||||
|
|
||||||
flake_regressions:
|
flake_regressions:
|
||||||
needs: tests
|
needs: build_x86_64-linux
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout nix
|
- name: Checkout nix
|
||||||
|
|
21
.github/workflows/test.yml
vendored
Normal file
21
.github/workflows/test.yml
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
os:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
tests:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
runs-on: ${{ inputs.os }}
|
||||||
|
timeout-minutes: 60
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: DeterminateSystems/nix-installer-action@main
|
||||||
|
with:
|
||||||
|
flakehub: true
|
||||||
|
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||||
|
- run: nix flake check -L
|
Loading…
Add table
Add a link
Reference in a new issue