re-building build action
All checks were successful
Build / nix-build (native-x86_64, gandalf) (pull_request) Successful in 2m54s
Build / nix-build (native-x86_64, telperion) (pull_request) Successful in 1m56s
Build / nix-build (native-aarch64, varda) (pull_request) Successful in 6m49s
Build / nix-build (native-x86_64, shadowfax) (pull_request) Successful in 8m28s
Build / nix-build (native-x86_64, telchar) (pull_request) Successful in 13m21s

This commit is contained in:
Joseph Hanson 2024-09-13 21:03:15 -05:00
parent a0fdeaebf8
commit f048c10c55
Signed by: jahanson
SSH key fingerprint: SHA256:vy6dKBECV522aPAwklFM3ReKAVB086rT3oWwiuiFG7o

View file

@ -28,6 +28,8 @@ jobs:
os: native-x86_64 os: native-x86_64
- system: telperion - system: telperion
os: native-x86_64 os: native-x86_64
- system: shadowfax
os: native-x86_64
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
env: env:
PATH: ${{ format('{0}:{1}', '/run/current-system/sw/bin', env.PATH) }} PATH: ${{ format('{0}:{1}', '/run/current-system/sw/bin', env.PATH) }}
@ -46,55 +48,8 @@ jobs:
- name: Garbage collect build dependencies - name: Garbage collect build dependencies
run: nix-collect-garbage run: nix-collect-garbage
- name: Build previous ${{ matrix.system }} system
shell: bash
run: |
nix build git+https://git.hsn.dev/jahanson/mochi#top.${{ matrix.system }} \
-v --log-format raw --profile ./profile
- name: Build new ${{ matrix.system }} system - name: Build new ${{ matrix.system }} system
shell: bash shell: bash
run: | run: |
nix build ".#top.${{ matrix.system }}" --profile ./profile --fallback -v \ nix build ".#top.${{ matrix.system }}" --profile ./profile --fallback -v \
> >(tee stdout.log) 2> >(tee /tmp/nix-build-err.log >&2) > >(tee stdout.log) 2> >(tee /tmp/nix-build-err.log >&2)
- name: Check for build failure
if: failure()
run: |
drv=$(grep "For full logs, run" /tmp/nix-build-err.log | grep -oE "/nix/store/.*.drv")
if [ -n $drv ]; then
nix log $drv
echo $drv
fi
exit 1
- name: Diff profile
id: diff
run: |
nix profile diff-closures --profile ./profile
delimiter="$(openssl rand -hex 16)"
echo "diff<<${delimiter}" >> "${GITHUB_OUTPUT}"
nix profile diff-closures --profile ./profile | perl -pe 's/\e\[[0-9;]*m(?:\e\[K)?//g' >> "${GITHUB_OUTPUT}"
echo "${delimiter}" >> "${GITHUB_OUTPUT}"
# - name: Comment report in pr
# uses: https://github.com/marocchino/sticky-pull-request-comment@v2
# with:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# header: ".#top.${{ matrix.system }}"
# message: |
# ### Report for `${{ matrix.system }}`
# <summary> Version changes </summary> <br>
# <pre> ${{ steps.diff.outputs.diff }} </pre>
# - name: Push to Cachix
# if: success()
# env:
# CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
# run: nix build ".#top.${{ matrix.system }}" --json | jq -r .[].drvPath | cachix push hsndev
nix-build-success:
if: ${{ always() }}
needs:
- nix-build
name: Nix Build Successful
runs-on: docker
steps:
- if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
name: Check matrix status
run: exit 1