-
Notifications
You must be signed in to change notification settings - Fork 10
55 lines (55 loc) · 1.85 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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