-
Notifications
You must be signed in to change notification settings - Fork 182
63 lines (52 loc) · 2.36 KB
/
Copy pathrender.yml
File metadata and controls
63 lines (52 loc) · 2.36 KB
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
56
57
58
59
60
61
62
63
name: Check Renderability
on:
pull_request:
jobs:
render:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 3
- name: Verify nonexistence of `rendered` and `base_ref`
shell: bash
run: |
if [ -e rendered ]; then exit 1; fi
if [ -e base_ref ]; then exit 1; fi
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@ef8a148080ab6020fd15196c2084a2eea5ff2d25 # v22
- name: Restore Nix store cache
id: nix-cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: /tmp/nix-closure
key: nix-devshell-${{ runner.os }}-${{ hashFiles('flake.lock', 'flake.nix') }}
- name: Import cached Nix store paths
if: steps.nix-cache.outputs.cache-hit == 'true'
run: nix-store --import < /tmp/nix-closure/store.nar
- name: Compile ZIPs
run: nix develop --profile /tmp/dev-profile --command make all-zips
- name: Render regression tests
run: nix develop --profile /tmp/dev-profile --command make test
- name: Set base ref
run: |
git show --format=%H --no-notes --no-patch "HEAD~1" -- |tee base_ref
if ! ( grep -E '^[0-9a-f]{40}$' base_ref ); then exit 1; fi
- name: Compile Protocol Specification
run: nix develop --profile /tmp/dev-profile --command make all
- name: Export Nix store for caching
if: steps.nix-cache.outputs.cache-hit != 'true'
run: |
# Free up some space before creating the (possibly very large) store tarball.
df
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -rn 2>/dev/null | head -30
docker system prune --all --force || /bin/true
sudo apt-get -y remove --purge \
'^docker.*' '^microsoft-edge.*' azure-cli '^google-cloud-cli.*' '^google-chrome.*' \
firefox java-common '^llvm-.*' '^libllvm.*' '^libclang-.*' '^mysql-.*' powershell snapd
sudo apt-get -y autoremove --purge
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -rn 2>/dev/null | head -30
df
mkdir -p /tmp/nix-closure
nix-store --export $(nix-store -qR /tmp/dev-profile) > /tmp/nix-closure/store.nar