-
Notifications
You must be signed in to change notification settings - Fork 1
75 lines (71 loc) · 2.71 KB
/
ci.yml
File metadata and controls
75 lines (71 loc) · 2.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: "om ci"
on:
# push:
# branches:
# - main
# pull_request:
# branches:
# - main
workflow_dispatch: # Allow manual triggers
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
configure:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v6.0.2
- uses: DeterminateSystems/determinate-nix-action@v3.20.0
with: &nix-install-with
extra-conf: |
accept-flake-config = true
extra-substituters = https://darkmatter.cachix.org
extra-trusted-public-keys = darkmatter.cachix.org-1:8Qy6cJtK9GKOjb+3OYCSbAwofFKAIsrf4NROpTmZ8kM=
- name: Install omnix
run: nix --accept-flake-config profile add github:juspay/omnix
- id: set-matrix
run: |
set -euxo pipefail
# Get matrix for both Linux and Darwin
MATRIX="$(om ci gh-matrix --systems=x86_64-linux,aarch64-darwin -- --impure | jq -c .)"
echo "matrix=$MATRIX" >> $GITHUB_OUTPUT
nix:
# Map Nix systems to GitHub runner labels
runs-on: ${{ matrix.system == 'aarch64-darwin' && 'depot-macos-latest' || matrix.system }}
needs: configure
strategy:
matrix: ${{ fromJson(needs.configure.outputs.matrix) }}
fail-fast: false
steps:
- uses: actions/checkout@v6.0.2
- name: Install Nix
uses: DeterminateSystems/determinate-nix-action@v3.20.0
with: *nix-install-with
- name: Pre-install cachix for Determinate Nix (Darwin)
if: matrix.system == 'aarch64-darwin'
run: nix profile add nixpkgs#cachix
- name: Setup Cachix
uses: cachix/cachix-action@v16
with:
name: darkmatter
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
# On Darwin, use pre-installed cachix (via nix profile); on Linux use default install
installCommand: ${{ matrix.system == 'aarch64-darwin' && 'true' || '' }}
- name: Install omnix
run: nix --accept-flake-config profile install github:juspay/omnix
- name: Run om ci (Linux)
if: matrix.system != 'aarch64-darwin'
run: om ci run --systems "${{ matrix.system }}" ".#default.${{ matrix.subflake }}" -- --impure
- name: Run om ci (Darwin - skip devenv)
if: matrix.system == 'aarch64-darwin'
run: |
# Build packages directly with SKIP_DEVENV to avoid container outputs
export SKIP_DEVENV=true
nix build .#packages.aarch64-darwin.stackpanel-cli --impure
nix build .#packages.aarch64-darwin.default --impure
nix flake check --no-build --impure