mirror of
https://github.com/NixOS/nix
synced 2025-06-30 19:57:59 +02:00
Collapse build / test into one .yml to make skips easier
This commit is contained in:
parent
42cb189703
commit
c134cf52db
4 changed files with 22 additions and 61 deletions
17
.github/workflows/build.yml
vendored
17
.github/workflows/build.yml
vendored
|
@ -11,6 +11,10 @@ on:
|
|||
required: false
|
||||
default: true
|
||||
type: boolean
|
||||
run_tests:
|
||||
required: false
|
||||
default: true
|
||||
type: boolean
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
@ -31,3 +35,16 @@ jobs:
|
|||
with:
|
||||
name: ${{ inputs.system }}
|
||||
path: ./tarball/*.xz
|
||||
test:
|
||||
if: ${{ inputs.if && inputs.run_tests}}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
runs-on: ${{ inputs.os }}
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: DeterminateSystems/nix-installer-action@main
|
||||
with:
|
||||
determinate: true
|
||||
- uses: DeterminateSystems/flakehub-cache-action@main
|
||||
- run: nix flake check -L --system ${{ inputs.system }}
|
||||
|
|
35
.github/workflows/ci.yml
vendored
35
.github/workflows/ci.yml
vendored
|
@ -51,39 +51,6 @@ jobs:
|
|||
os: namespace-profile-mac-m2-12c28g
|
||||
system: aarch64-darwin
|
||||
|
||||
test_x86_64-linux:
|
||||
uses: ./.github/workflows/test.yml
|
||||
needs: build_x86_64-linux
|
||||
with:
|
||||
os: blacksmith-32vcpu-ubuntu-2204
|
||||
system: x86_64-linux
|
||||
|
||||
test_aarch64-linux:
|
||||
if: success() || failure()
|
||||
uses: ./.github/workflows/test.yml
|
||||
needs: build_aarch64-linux
|
||||
with:
|
||||
if: ${{ github.event_name == 'merge_group' }}
|
||||
os: blacksmith-32vcpu-ubuntu-2204-arm
|
||||
system: aarch64-linux
|
||||
|
||||
test_x86_64-darwin:
|
||||
if: success() || failure()
|
||||
uses: ./.github/workflows/test.yml
|
||||
needs: build_x86_64-darwin
|
||||
with:
|
||||
if: ${{ github.event_name == 'merge_group' }}
|
||||
os: namespace-profile-mac-m2-12c28g
|
||||
system: x86_64-darwin
|
||||
|
||||
test_aarch64-darwin:
|
||||
uses: ./.github/workflows/test.yml
|
||||
needs: build_aarch64-darwin
|
||||
with:
|
||||
if: ${{ github.event_name == 'merge_group' }}
|
||||
os: namespace-profile-mac-m2-12c28g
|
||||
system: aarch64-darwin
|
||||
|
||||
vm_tests_smoke:
|
||||
if: github.event_name != 'merge_group'
|
||||
needs: build_x86_64-linux
|
||||
|
@ -165,7 +132,7 @@ jobs:
|
|||
run: nix build .#hydraJobs.manual
|
||||
- uses: nwtgck/actions-netlify@v3.0
|
||||
with:
|
||||
publish-dir: './result/share/doc/nix/manual'
|
||||
publish-dir: "./result/share/doc/nix/manual"
|
||||
production-branch: detsys-main
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
deploy-message: "Deploy from GitHub Actions"
|
||||
|
|
27
.github/workflows/test.yml
vendored
27
.github/workflows/test.yml
vendored
|
@ -1,27 +0,0 @@
|
|||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
os:
|
||||
required: true
|
||||
type: string
|
||||
system:
|
||||
required: true
|
||||
type: string
|
||||
if:
|
||||
required: false
|
||||
default: true
|
||||
type: boolean
|
||||
jobs:
|
||||
tests:
|
||||
if: ${{ inputs.if }}
|
||||
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/flakehub-cache-action@main
|
||||
- run: nix flake check -L --system ${{ inputs.system }}
|
4
.github/workflows/upload-release.yml
vendored
4
.github/workflows/upload-release.yml
vendored
|
@ -30,24 +30,28 @@ jobs:
|
|||
with:
|
||||
os: blacksmith-32vcpu-ubuntu-2204
|
||||
system: x86_64-linux
|
||||
run_tests: false
|
||||
|
||||
build-aarch64-linux:
|
||||
uses: ./.github/workflows/build.yml
|
||||
with:
|
||||
os: blacksmith-32vcpu-ubuntu-2204-arm
|
||||
system: aarch64-linux
|
||||
run_tests: false
|
||||
|
||||
build-x86_64-darwin:
|
||||
uses: ./.github/workflows/build.yml
|
||||
with:
|
||||
os: macos-13
|
||||
system: x86_64-darwin
|
||||
run_tests: false
|
||||
|
||||
build-aarch64-darwin:
|
||||
uses: ./.github/workflows/build.yml
|
||||
with:
|
||||
os: macos-latest
|
||||
system: aarch64-darwin
|
||||
run_tests: false
|
||||
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue