non-intrusive changes for ci. #81
This file contains hidden or 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: Build PR | |
on: pull_request | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
build-kernel: | |
runs-on: | |
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: | | |
PR_TITLE="${{ github.event.pull_request.title }}" | |
if KERNEL=$(python3 .github/workflows/validate-kernel-pr.py "pr" "$PR_TITLE"); then | |
echo "kernel=$KERNEL" >> $GITHUB_OUTPUT | |
echo "skip=false" >> $GITHUB_OUTPUT | |
else | |
echo "skip=true" >> $GITHUB_OUTPUT | |
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/ ) |