Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 10 additions & 17 deletions .github/workflows/build-pr-mac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,7 @@ jobs:
build-kernel:
runs-on: macos-15
steps:
- uses: actions/checkout@v5
- uses: DeterminateSystems/nix-installer-action@v20
with:
extra-conf: |
max-jobs = 1
cores = 3
sandbox = relaxed
- name: Nix info
run: nix-shell -p nix-info --run "nix-info -m"
- uses: cachix/cachix-action@v16
with:
name: huggingface
env:
USER: runner
- uses: actions/checkout@v4
- name: Validate kernel directory
id: validate
env:
Expand All @@ -38,6 +25,12 @@ jobs:
fi
- name: Build kernel
if: steps.validate.outputs.skip == 'false'
run: |
KERNEL="${{ steps.validate.outputs.kernel }}"
( cd "$KERNEL" && nix build -L .#ci && ls -l result/ )
uses: huggingface/publish-to-the-kernel-hub-action@main
with:
kernel-path: ${{ steps.validate.outputs.kernel }}
build-target: ci
nix-command: build
nix-max-jobs: '1'
nix-cores: '3'
sandbox-mode: relaxed
upload-artifact: 'false'
27 changes: 10 additions & 17 deletions .github/workflows/build-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,7 @@ jobs:
runs-on:
group: aws-highmemory-32-plus-nix
steps:
- uses: actions/checkout@v5
- uses: DeterminateSystems/nix-installer-action@main
with:
extra-conf: |
max-jobs = 2
cores = 12
sandbox-fallback = false
- name: Nix info
run: nix-shell -p nix-info --run "nix-info -m"
- uses: cachix/cachix-action@v16
with:
name: huggingface
env:
USER: runner
- uses: actions/checkout@v4
- name: Validate kernel directory
id: validate
env:
Expand All @@ -39,6 +26,12 @@ jobs:
fi
- name: Build kernel
if: steps.validate.outputs.skip == 'false'
run: |
KERNEL="${{ steps.validate.outputs.kernel }}"
( cd "$KERNEL" && nix build -L .#ci && ls -l result/ )
uses: huggingface/publish-to-the-kernel-hub-action@main
with:
kernel-path: ${{ steps.validate.outputs.kernel }}
build-target: ci
nix-command: build
nix-max-jobs: '2'
nix-cores: '12'
sandbox-mode: fallback
upload-artifact: 'false'
25 changes: 9 additions & 16 deletions .github/workflows/build-release-mac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,6 @@ jobs:
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v20
with:
extra-conf: |
max-jobs = 1
cores = 3
sandbox = relaxed
- name: Nix info
run: nix-shell -p nix-info --run "nix-info -m"
- uses: cachix/cachix-action@v16
with:
name: huggingface
env:
USER: runner
- name: Validate kernel directory
id: validate
run: |
Expand All @@ -38,8 +25,14 @@ jobs:
fi
- name: Build and upload kernel
if: steps.validate.outputs.skip == 'false'
uses: huggingface/publish-to-the-kernel-hub-action@main
with:
kernel-path: ${{ steps.validate.outputs.kernel }}
build-target: build-and-upload
nix-command: run
nix-max-jobs: '1'
nix-cores: '3'
sandbox-mode: relaxed
upload-artifact: 'false'
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
KERNEL="${{ steps.validate.outputs.kernel }}"
( cd "$KERNEL" && nix run -L .#build-and-upload )
25 changes: 9 additions & 16 deletions .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,6 @@ jobs:
group: aws-highmemory-32-plus-nix
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
with:
extra-conf: |
max-jobs = 2
cores = 12
sandbox-fallback = false
- name: Nix info
run: nix-shell -p nix-info --run "nix-info -m"
- uses: cachix/cachix-action@v16
with:
name: huggingface
env:
USER: runner
- name: Validate kernel directory
id: validate
run: |
Expand All @@ -39,8 +26,14 @@ jobs:
fi
- name: Build and upload kernel
if: steps.validate.outputs.skip == 'false'
uses: huggingface/publish-to-the-kernel-hub-action@main
with:
kernel-path: ${{ steps.validate.outputs.kernel }}
build-target: build-and-upload
nix-command: run
nix-max-jobs: '2'
nix-cores: '12'
sandbox-mode: fallback
upload-artifact: 'false'
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
KERNEL="${{ steps.validate.outputs.kernel }}"
( cd "$KERNEL" && nix run -L .#build-and-upload )
29 changes: 9 additions & 20 deletions .github/workflows/manual-build-upload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,6 @@ jobs:
ref: refs/pull/${{ inputs.pr_number }}/head
fetch-depth: 0

- uses: DeterminateSystems/nix-installer-action@main
with:
extra-conf: |
max-jobs = 2
cores = 12
sandbox-fallback = false

- name: Nix info
run: nix-shell -p nix-info --run "nix-info -m"

- uses: cachix/cachix-action@v16
with:
name: huggingface
env:
USER: runner

- name: Validate kernel directory
id: validate
run: |
Expand All @@ -71,10 +55,15 @@ jobs:
fi

- name: Build and copy kernel
run: |
set -eu
KERNEL="${{ steps.validate.outputs.kernel }}"
( cd "$KERNEL" && nix run -L .#build-and-copy )
uses: huggingface/publish-to-the-kernel-hub-action@main
with:
kernel-path: ${{ steps.validate.outputs.kernel }}
build-target: build-and-copy
nix-command: run
nix-max-jobs: '2'
nix-cores: '12'
sandbox-mode: fallback
upload-artifact: 'false'

- name: Upload kernel
env:
Expand Down
Loading