Skip to content

Commit 01c022e

Browse files
committed
contrib: switch to our Guix container instead of the bundled one
1 parent 1541612 commit 01c022e

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

.github/workflows/guix-build.yml

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ jobs:
1717
- name: Set up Docker Buildx
1818
uses: docker/setup-buildx-action@v1
1919

20-
- name: Hash Dockerfile
20+
- name: Commit variables
2121
id: dockerfile
2222
run: |
23-
echo "::set-output name=hash::$(sha256sum ./contrib/guix/Dockerfile | cut -d ' ' -f1)"
23+
echo "::set-output name=hash::$(sha256sum ./contrib/containers/guix/Dockerfile | cut -d ' ' -f1)"
24+
echo "::set-output name=host_user_id::$(id -u)"
25+
echo "::set-output name=host_group_id::$(id -g)"
2426
2527
- name: Cache Docker layers
2628
uses: actions/cache@v2
@@ -33,25 +35,27 @@ jobs:
3335
- name: Build Docker image
3436
uses: docker/build-push-action@v2
3537
with:
36-
context: .
37-
file: ./contrib/guix/Dockerfile
38+
context: ${{ github.workspace }}
39+
build-args: |
40+
USER_ID=${{ steps.dockerfile.outputs.host_user_id }}
41+
GROUP_ID=${{ steps.dockerfile.outputs.host_group_id }}
42+
build-contexts: |
43+
docker_root=${{ github.workspace }}/contrib/containers/guix
44+
file: ./contrib/containers/guix/Dockerfile
3845
load: true
39-
tags: alpine-guix:latest
46+
tags: guix_ubuntu:latest
4047
cache-from: type=local,src=/tmp/.buildx-cache
4148
cache-to: type=local,dest=/tmp/.buildx-cache
4249

4350
- name: Run Guix build
4451
run: |
45-
export ADDITIONAL_GUIX_COMMON_FLAGS='--max-jobs=32' && \
46-
mkdir -p depends/SDKs && \
47-
mkdir -p /tmp/guix-store && \
48-
curl -L https://bitcoincore.org/depends-sources/sdks/Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz | tar -xz -C depends/SDKs && \
49-
docker run --privileged -d --name guix-daemon --rm -v ${{ github.workspace }}:/dash -w /dash alpine-guix:latest && \
50-
docker exec guix-daemon bash -c "\
51-
chmod 777 /dash/depends && \
52-
git config --global --add safe.directory /dash && \
53-
cd /dash && \
54-
contrib/guix/guix-build"
52+
docker run --privileged -d --rm -t \
53+
--name guix-daemon \
54+
-e ADDITIONAL_GUIX_COMMON_FLAGS='--max-jobs=32' \
55+
-v ${{ github.workspace }}:/src/dash \
56+
-w /src/dash \
57+
guix_ubuntu:latest && \
58+
docker exec guix-daemon bash -c "/usr/local/bin/guix-start"
5559
5660
- name: Ensure build passes
5761
run: |

0 commit comments

Comments
 (0)