mirror of
https://github.com/danth/stylix
synced 2025-02-16 13:28:35 +00:00
Enable CI for Darwin packages 👷
This commit is contained in:
parent
dd33836655
commit
e626c4e54e
1 changed files with 17 additions and 4 deletions
21
.github/workflows/build.yml
vendored
21
.github/workflows/build.yml
vendored
|
@ -12,34 +12,47 @@ jobs:
|
|||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v19
|
||||
|
||||
- name: Set up Cachix
|
||||
uses: cachix/cachix-action@v12
|
||||
with:
|
||||
name: danth
|
||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: List packages
|
||||
id: list-packages
|
||||
run: |
|
||||
nix flake show . --json | jq -rc '{checks: (.checks // {}), packages: (.packages // {})} | to_entries | map(.key as $type | .value | to_entries | map(select(.key == "x86_64-linux") | .value | to_entries | map({type: $type, key: .key})) | flatten) | flatten | "packages=\(.)"' >> $GITHUB_OUTPUT
|
||||
nix flake show . --json | jq -rc 'to_entries | map(.key as $type | select($type == "checks" or $type == "packages") | .value | to_entries | map(.key as $arch | select($arch == "x86_64-linux" or $arch == "x86_64-darwin") | .value | to_entries | map({type: $type, arch: $arch, os: (if $arch == "x86_64-linux" then "ubuntu-latest" else "macos-latest" end), key: .key})) | flatten) | flatten | "packages=\(.)"' >> $GITHUB_OUTPUT
|
||||
|
||||
outputs:
|
||||
packages: ${{ steps.list-packages.outputs.packages }}
|
||||
|
||||
build:
|
||||
needs: evaluate
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
build: ${{ fromJSON(needs.evaluate.outputs.packages) }}
|
||||
|
||||
name: Build ${{ matrix.build.key }}
|
||||
name: ${{ matrix.build.key }} on ${{ matrix.build.arch }}
|
||||
|
||||
runs-on: ${{ matrix.build.os }}
|
||||
|
||||
steps:
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v19
|
||||
|
||||
- name: Set up Cachix
|
||||
uses: cachix/cachix-action@v12
|
||||
with:
|
||||
name: danth
|
||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Build ${{ matrix.build.key }}
|
||||
run: nix -L build .#${{ matrix.build.type }}.x86_64-linux.${{ matrix.build.key }}
|
||||
run: nix -L build .#${{ matrix.build.type }}.${{ matrix.build.arch }}.${{ matrix.build.key }}
|
||||
|
|
Loading…
Add table
Reference in a new issue