chore(flake/darwin): 09414c7e
-> 87131f51
#13007
Workflow file for this run
This file contains 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 | |
on: | |
push: | |
branches: | |
- master | |
- try | |
pull_request: | |
permissions: {} | |
env: | |
flake: github:${{ github.repository }}/${{ github.sha }} | |
nix-conf: |- | |
accept-flake-config = true | |
always-allow-substitutes = true | |
builders-use-substitutes = true | |
max-jobs = auto | |
jobs: | |
flake-check: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-24.04, macos-15 ] | |
steps: | |
- uses: DeterminateSystems/nix-installer-action@v16 | |
with: | |
extra-conf: ${{ env.nix-conf }} | |
- uses: cachix/cachix-action@v15 | |
with: | |
name: nix-config | |
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
extraPullNames: vim-config,nix-community | |
- name: nix-flake-check | |
run: nix flake check '${{ env.flake }}' | |
flake-show: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-24.04, macos-15 ] | |
steps: | |
- uses: DeterminateSystems/nix-installer-action@v16 | |
with: | |
extra-conf: ${{ env.nix-conf }} | |
- uses: cachix/cachix-action@v15 | |
with: | |
name: nix-config | |
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
extraPullNames: vim-config,nix-community | |
- name: nix-flake-show | |
run: nix flake show '${{ env.flake }}' | |
get-attrs: | |
runs-on: ubuntu-24.04 | |
outputs: | |
build: ${{ steps.get-attrs.outputs.build }} | |
eval: ${{ steps.get-attrs.outputs.eval }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
nix/hosts.nix | |
.github/workflows/get-attrs.py | |
- uses: nixbuild/nix-quick-install-action@v29 | |
- id: get-attrs | |
run: | | |
./.github/workflows/get-attrs.py | |
eval: | |
name: eval ${{ matrix.attrs.name }} | |
runs-on: ${{ matrix.attrs.runsOn }} | |
needs: [ get-attrs ] | |
strategy: | |
fail-fast: false | |
matrix: | |
attrs: ${{ fromJson(needs.get-attrs.outputs.eval) }} | |
env: | |
system: ${{ matrix.attrs.hostPlatform }} | |
if: ${{ fromJson(needs.get-attrs.outputs.eval)[0] != null }} | |
steps: | |
- uses: DeterminateSystems/nix-installer-action@v16 | |
with: | |
extra-conf: ${{ env.nix-conf }} | |
- uses: cachix/cachix-action@v15 | |
with: | |
name: nix-config | |
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
extraPullNames: vim-config,nix-community | |
- name: eval | |
if: ${{ matrix.attrs.evalOnly }} | |
run: | | |
nix eval --raw '${{ env.flake }}#${{ matrix.attrs.attr }}' | |
build: | |
name: build ${{ matrix.attrs.name }} | |
runs-on: ${{ matrix.attrs.runsOn }} | |
needs: [ get-attrs ] | |
strategy: | |
fail-fast: false | |
matrix: | |
attrs: ${{ fromJson(needs.get-attrs.outputs.build) }} | |
env: | |
system: ${{ matrix.attrs.hostPlatform }} | |
steps: | |
- uses: DeterminateSystems/nix-installer-action@v16 | |
with: | |
extra-conf: ${{ env.nix-conf }} | |
- uses: cachix/cachix-action@v15 | |
with: | |
name: nix-config | |
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
extraPullNames: vim-config,nix-community | |
- name: nix-fast-build | |
run: | | |
declare -a args=( | |
'--no-nom' | |
'--skip-cached' | |
'--systems=${{ env.system }}' | |
'--option' 'accept-flake-config' 'true' | |
'--retries=3' | |
) | |
args+=('--flake=${{ env.flake }}#${{ matrix.attrs.attr }}') | |
nix run '${{ env.flake }}#nix-fast-build' -- "${args[@]}" | |
check: | |
runs-on: ubuntu-24.04 | |
needs: [ flake-check, flake-show, build, eval ] | |
if: always() | |
steps: | |
- uses: re-actors/alls-green@release/v1 | |
with: | |
jobs: ${{ toJSON(needs) }} | |
allowed-skips: eval |