Skip to content

Add nix flake for baochip targets #7

Add nix flake for baochip targets

Add nix flake for baochip targets #7

Workflow file for this run

name: Nix Build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: Build ${{ matrix.package }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package:
- dabao-helloworld
- bao1x-boot0
- bao1x-alt-boot1
- bao1x-boot1
# needed for flakehub cache
permissions:
id-token: "write"
contents: "read"
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
#with:
# extra-conf: |
# sandbox = false
- name: Setup Nix cache
#uses: DeterminateSystems/magic-nix-cache-action@main
uses: DeterminateSystems/flakehub-cache-action@v3
- name: Build ${{ matrix.package }}
run: nix build .#${{ matrix.package }} --print-build-logs
#- name: Upload artifacts
# uses: actions/upload-artifact@v4
# with:
# name: ${{ matrix.package }}
# path: result/
# if-no-files-found: error
# Flake health checks
check:
name: Flake check
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Setup Nix cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Run flake check
run: nix flake check
- name: Show flake outputs
run: nix flake show