-
Notifications
You must be signed in to change notification settings - Fork 114
74 lines (68 loc) · 2.24 KB
/
build_toolchain.yaml
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
64
65
66
67
68
69
70
71
72
73
74
name: Build Cross Compiler Toolchain
on: workflow_dispatch
jobs:
build_toolchain:
runs-on: ubuntu-20.04
timeout-minutes: 120
strategy:
fail-fast: false
steps:
- name: Checkout branch
uses: actions/checkout@v3
with:
fetch-depth: 2
# See build.yaml.
- name: Free disk space
run: |
set -o errexit
set -o xtrace
df --human-readable
sudo apt-get remove --yes \
'^dotnet-.*' '^llvm-.*' 'php.*' azure-cli \
hhvm google-chrome-stable firefox powershell
df --human-readable
sudo apt-get autoremove --yes
df --human-readable
sudo apt clean
df --human-readable
docker rmi $(docker image ls --all --quiet)
df --human-readable
rm --recursive --force "${AGENT_TOOLSDIRECTORY}"
df --human-readable
- name: Docker pull
timeout-minutes: 10
run: |
./scripts/docker_pull
df --human-readable
- name: Run command
run: |
./scripts/docker_run toolchain/build.sh
df --human-readable
- name: Download Ent CLI
if: steps.cache-ent.outputs.cache-hit != 'true'
env:
ENT_URL: https://ent-server-62sa4xcfia-ew.a.run.app
ENT_DIGEST_SHA_2_256: ca76e76e32e0b984a8d55d1a27d587865774b29a2ae2fffd756ffc2dbd4880bd
run: |
set -o errexit
set -o nounset
set -o xtrace
set -o pipefail
curl --fail ${ENT_URL}/raw/sha2-256:${ENT_DIGEST_SHA_2_256} > /usr/local/bin/ent
echo "${ENT_DIGEST_SHA_2_256} /usr/local/bin/ent" | sha256sum --check
chmod +x /usr/local/bin/ent
ent
cat <<EOF > ~/.config/ent.toml
[[remotes]]
name = 'ent-store'
url = '${ENT_URL}'
write = true
api_key = '${{ secrets.ENT_API_KEY }}'
EOF
- name: Upload to Ent
run: |
ent put ./toolchain/toolchain.tar.bz2
# Ensure that the previous steps did not modify our source-code and that
# relevant build artifacts are ignored by git.
- name: Git check diff
run: ./scripts/docker_run ./scripts/git_check_diff