-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add github action for checking build
- Loading branch information
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
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 |