Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
aaf7a9387This file is pinned to the selected release. Download the original to open it in your design tool.
name: Build LibreLane with Nix
description: Builds default devShell for a platform, caching the results (if applicable)
inputs:
shell:
description: "Shell to use"
required: true
default: "bash"
nix_system:
description: "The nix platform string to build for"
required: true
default: "x86_64-linux"
run_tests:
description: Whether to run unit tests and the smoke test
required: false
default: "false"
pdk_root:
description: "An optional override for the PDK root."
required: false
default: "$HOME/.ciel"
runs:
using: "composite"
steps:
- id: set-pdk-root-env
name: Set PDK_ROOT Environment Variables
shell: ${{ inputs.shell }}
run: |
echo "PDK_ROOT=$(python3 -c "import os; print(os.path.abspath('${{ inputs.pdk_root }}'))")" >> $GITHUB_ENV
- id: build
name: Build
shell: ${{ inputs.shell }}
run: |
echo "#################################################################"
outPath=$(nix build\
--print-out-paths\
--no-link\
--accept-flake-config\
--option system ${{ inputs.nix_system }}\
--extra-platforms ${{ inputs.nix_system }}\
.#devShells.${{ inputs.nix_system }}.default)
echo "out-path=$outPath" >> $GITHUB_OUTPUT
sudo du -hs /nix/store/* | sort -h | tail -n 20
- name: Smoke Test
shell: ${{ inputs.shell }}
if: inputs.run_tests == 'true'
run: |
echo "#################################################################"
nix run\
--option system ${{ inputs.nix_system }}\
--extra-platforms ${{ inputs.nix_system }}\
--accept-flake-config\
.#packages.${{ inputs.nix_system }}.librelane -- --smoke-test
- name: Unit/Step Tests
shell: ${{ inputs.shell }}
if: inputs.run_tests == 'true'
run: |
echo "#################################################################"
nix develop\
--option system ${{ inputs.nix_system }}\
--extra-platforms ${{ inputs.nix_system }}\
--accept-flake-config\
.#devShells.${{ inputs.nix_system }}.dev --command\
pytest -m all --pdk-root=$PDK_ROOT -n auto