build #133
This file contains 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 | |
on: | |
push: | |
pull_request: | |
schedule: | |
# weekly builds to make sure it works with the latest version of Guix | |
- cron: '39 3 * * 0' | |
jobs: | |
build: | |
name: make distcheck | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install GNU Guix | |
uses: PromyLOPh/[email protected] | |
with: | |
pullAfterInstall: false | |
- name: Describe Guix | |
run: echo "guix-commit=$(guix describe | grep commit | join -a1 -o1.2 - /dev/null)" >> $GITHUB_OUTPUT | |
id: guix-commit | |
- name: Guix cache | |
id: guix-cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/guix | |
key: guix-cache-${{ steps.guix-commit.outputs.guix-commit }} | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Build Guix environment | |
if: steps.guix-cache.outputs.cache-hit != 'true' | |
run: | | |
mkdir -p ~/.cache/guix | |
guix environment -l guix.scm --root=env -- echo done | |
guix archive --export --recursive $(readlink -f env) > ~/.cache/guix/env | |
cp /etc/guix/signing-key.pub ~/.cache/guix/ | |
- name: Authorize cached signing key | |
if: steps.guix-cache.outputs.cache-hit == 'true' | |
run: | | |
cat ~/.cache/guix/signing-key.pub | sudo guix archive --authorize | |
- name: Import Guix environment | |
if: steps.guix-cache.outputs.cache-hit == 'true' | |
run: | | |
du -sh ~/.cache/guix/env | |
cat ~/.cache/guix/env | sudo guix archive --import | |
- name: Bootstrap | |
run: guix shell -D -f guix.scm -- ./bootstrap.sh | |
- name: Configure | |
run: guix shell -D -f guix.scm -- ./configure | |
- name: Build | |
run: guix shell -D -f guix.scm -- make -j | |
- name: Distcheck | |
env: | |
VERBOSE: "true" | |
run: guix shell -D -f guix.scm -- make distcheck |