CI: switch workflow to x86_64-linux to prevent rate limiting Signed-off-by: Leo Moser <leomoser99@gmail.com>
diff --git a/.github/actions/setup_nix/action.yml b/.github/actions/setup_nix/action.yml new file mode 100644 index 0000000..59ef361 --- /dev/null +++ b/.github/actions/setup_nix/action.yml
@@ -0,0 +1,46 @@ +name: Install Nix +description: Installs Nix or a Nix-compatible flake fork, while also enabling + the requisite caches. +inputs: + shell: + description: "Shell to use for glue logic" + required: true + default: "bash" + github_token: + description: "A token for the Nix daemon to use when fetching information from GitHub" + required: false + default: "" + nix_cache_domain: + description: "An additional https-hosted Nix build cache" + required: false + default: "" + nix_public_key: + description: "The public key for the aforementioned Nix cache if specified" + required: false + default: "" +runs: + using: "composite" + steps: + - name: Set GitHub Token Config String + if: inputs.github_token != '' + shell: ${{ inputs.shell }} + run: | + echo "GITHUB_ACCESS_TOKEN_STR=${{ inputs.github_token }}" >> $GITHUB_ENV + - name: Set Nix Cache Config Strings + if: inputs.nix_cache_domain != '' && inputs.nix_public_key != '' + shell: ${{ inputs.shell }} + run: | + echo "EXTRA_SUBSTITUTER_STR=https://${{ inputs.nix_cache_domain }}" >> $GITHUB_ENV + echo "EXTRA_TRUSTED_KEY_STR=${{ inputs.nix_public_key }}" >> $GITHUB_ENV + - uses: DeterminateSystems/nix-installer-action@main + with: + determinate: false + extra-conf: | + access-tokens = ${{ env.GITHUB_ACCESS_TOKEN_STR }} + extra-substituters = ${{ env.EXTRA_SUBSTITUTER_STR }} https://nix-cache.fossi-foundation.org + extra-trusted-public-keys = ${{ env.EXTRA_TRUSTED_KEY_STR }} nix-cache.fossi-foundation.org:3+K59iFwXqKsL7BNu6Guy0v+uTlwsxYQxjspXzqLYQs= + - name: Inject GitHub Token into Environment + if: inputs.github_token != '' + uses: fossi-foundation/nix-eda/.github/actions/nix_daemon_inject_github_token@5.5.0 + with: + github_token: ${{ inputs.github_token }}
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8f933e5..4e07d5c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml
@@ -8,39 +8,16 @@ build-and-test: strategy: matrix: - os: - [ - { - name: "macOS 14", - family: "macOS", - runner: "macos-14", - archs: "arm64", - }, - ] pdk-family: [sky130, gf180mcu] - name: Build ${{ matrix.pdk-family }} with Ciel | ${{ matrix.os.name }} | ${{ matrix.os.archs }} - runs-on: ${{ matrix.os.runner }} + name: Build ${{ matrix.pdk-family }} with Ciel | (Nix/x86_64-linux) + runs-on: ubuntu-24.04 steps: - - name: Clear Build Space - run: | - echo "== Before ==" - df -h - for xcode in /Applications/Xcode*; do - echo "== Removing $xcode … ==" - rm -rf $xcode - done - echo "== After ==" - df -h - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: fetch-depth: 0 - - uses: DeterminateSystems/nix-installer-action@main + - uses: ./.github/actions/setup_nix with: - determinate: false - extra-conf: | - access-tokens = ${{ env.GITHUB_ACCESS_TOKEN_STR }} - extra-substituters = https://nix-cache.fossi-foundation.org - extra-trusted-public-keys = nix-cache.fossi-foundation.org:3+K59iFwXqKsL7BNu6Guy0v+uTlwsxYQxjspXzqLYQs= + github_token: ${{ secrets.GITHUB_TOKEN }} - name: Install Magic, Ciel, GHR run: | nix profile install github:fossi-foundation/nix-eda#{ghr,magic-vlsi} github:fossi-foundation/ciel @@ -53,7 +30,7 @@ echo "PDK_ROOT=$PWD/root" >> $GITHUB_ENV - name: Build with Ciel run: | - ciel build --include-libraries all --pdk-family ${{ matrix.pdk-family }} --use-repo-at open_pdks=$PWD --jobs $(sysctl -n hw.logicalcpu) --clear-build-artifacts $(git rev-parse HEAD) + ciel build --include-libraries all --pdk-family ${{ matrix.pdk-family }} --use-repo-at open_pdks=$PWD --jobs $(nproc) --clear-build-artifacts $(git rev-parse HEAD) - name: Push if New Tag if: github.ref_type == 'tag' run: |