Skip to content
This repository was archived by the owner on Apr 6, 2026. It is now read-only.

Commit bfd1451

Browse files
authored
CI: sandboxed builds and enable Cachix pushes (#266)
1 parent 871987b commit bfd1451

4 files changed

Lines changed: 64 additions & 23 deletions

File tree

.github/workflows/build_kernel.yaml

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,25 @@ on:
99

1010
jobs:
1111
build:
12-
name: Build kernel
12+
name: Build kernels
1313
runs-on:
14-
group: aws-g6-12xlarge-plus
14+
group: aws-highmemory-32-plus-nix
1515
steps:
1616
- uses: actions/checkout@v4
17-
- uses: cachix/install-nix-action@v27
17+
- uses: DeterminateSystems/nix-installer-action@main
1818
with:
19-
nix_path: nixpkgs=channel:nixos-unstable
20-
- uses: cachix/cachix-action@v14
19+
extra-conf: |
20+
max-jobs = 4
21+
cores = 12
22+
sandbox-fallback = false
23+
- uses: cachix/cachix-action@v16
2124
with:
2225
name: huggingface
23-
#authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
26+
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
2427
env:
25-
USER: github_runner
28+
USER: runner
29+
- name: Nix info
30+
run: nix-shell -p nix-info --run "nix-info -m"
2631
- name: Build activation kernel
2732
run: ( cd examples/activation && nix build .\#redistributable.torch29-cxx11-cu126-x86_64-linux )
2833
- name: Copy activation kernel
@@ -58,6 +63,31 @@ jobs:
5863
- name: Copy silu-and-mul-universal kernel
5964
run: cp -rL examples/silu-and-mul-universal/result silu-and-mul-universal-kernel
6065

66+
- name: Upload kernel artifacts
67+
uses: actions/upload-artifact@v4
68+
with:
69+
name: built-kernels
70+
path: |
71+
activation-kernel
72+
cutlass-gemm-kernel
73+
relu-kernel
74+
relu-backprop-compile-kernel
75+
silu-and-mul-universal-kernel
76+
77+
test:
78+
name: Test kernels
79+
needs: build
80+
runs-on:
81+
group: aws-g6-12xlarge-plus
82+
steps:
83+
- uses: actions/checkout@v4
84+
85+
- name: Download kernel artifacts
86+
uses: actions/download-artifact@v4
87+
with:
88+
name: built-kernels
89+
path: .
90+
6191
- name: Set up Docker Buildx
6292
uses: docker/setup-buildx-action@v3
6393
- name: Build Docker image

.github/workflows/build_kernel_rocm.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,23 @@ jobs:
1111
build:
1212
name: Build kernel
1313
runs-on:
14-
group: aws-g6-12xlarge-plus
14+
group: aws-highmemory-32-plus-nix
1515
steps:
1616
- uses: actions/checkout@v4
17-
- uses: cachix/install-nix-action@v27
17+
- uses: DeterminateSystems/nix-installer-action@main
1818
with:
19-
nix_path: nixpkgs=channel:nixos-unstable
19+
extra-conf: |
20+
max-jobs = 4
21+
cores = 12
22+
sandbox-fallback = false
2023
- uses: cachix/cachix-action@v14
2124
with:
2225
name: huggingface
23-
#authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
26+
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
2427
env:
25-
USER: github_runner
28+
USER: runner
29+
- name: Nix info
30+
run: nix-shell -p nix-info --run "nix-info -m"
2631
# For now we only test that there are no regressions in building ROCm
2732
# kernels. Also run tests once we have a ROCm runner.
2833
- name: Build relu kernel

.github/workflows/build_kernel_xpu.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,23 @@ jobs:
1111
build:
1212
name: Build kernel
1313
runs-on:
14-
group: aws-g6-12xlarge-plus
14+
group: aws-highmemory-32-plus-nix
1515
steps:
1616
- uses: actions/checkout@v4
17-
- uses: cachix/install-nix-action@v27
17+
- uses: DeterminateSystems/nix-installer-action@main
1818
with:
19-
nix_path: nixpkgs=channel:nixos-unstable
20-
- uses: cachix/cachix-action@v14
19+
extra-conf: |
20+
max-jobs = 4
21+
cores = 12
22+
sandbox-fallback = false
23+
- uses: cachix/cachix-action@v16
2124
with:
2225
name: huggingface
23-
#authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
26+
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
2427
env:
25-
USER: github_runner
28+
USER: runner
29+
- name: Nix info
30+
run: nix-shell -p nix-info --run "nix-info -m"
2631
# For now we only test that there are no regressions in building XPU
2732
# kernels. Also run tests once we have a XPU runner.
2833
- name: Build relu kernel

.github/workflows/test_extra_commands.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,19 @@ on:
1010
jobs:
1111
build:
1212
name: Build kernel
13-
runs-on:
14-
group: aws-g6-12xlarge-plus
1513
steps:
1614
- uses: actions/checkout@v4
17-
- uses: cachix/install-nix-action@v27
15+
- uses: DeterminateSystems/nix-installer-action@main
1816
with:
19-
nix_path: nixpkgs=channel:nixos-unstable
17+
extra-conf: |
18+
max-jobs = 4
19+
cores = 12
20+
sandbox-fallback = false
2021
- uses: cachix/cachix-action@v14
2122
with:
2223
name: huggingface
2324
#authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
2425
env:
25-
USER: github_runner
26+
USER: runner
2627
- name: Test nix run .#kernels
2728
run: ( cd examples/relu ; nix run .#kernels -- lock ../../tests/run-kernels )

0 commit comments

Comments
 (0)