-
Notifications
You must be signed in to change notification settings - Fork 16
81 lines (71 loc) · 1.93 KB
/
build-earthly.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Build - Earthly
on:
push:
branches:
- main
paths-ignore:
- "**.md"
- "src/**/**.md"
- "Makefiles/**"
- "nix/**"
- "book/**"
pull_request:
branches:
- main
paths-ignore:
- "**.md"
- "book/**"
- "src/**/**.md"
- "Makefiles/**"
- "nix/**"
- "book/**"
env:
RUST_LATEST_STABLE_VERSION: 1.71
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
RUST_BACKTRACE: 1
CARGO_INCREMENTAL: 0
CARGO_FLAGS: --verbose --locked
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 15
jobs:
cancel:
name: "Cancel Previous Runs"
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
build_on_linux:
name: Build Catalyst Core on Linux - With Earthly
runs-on: ubuntu-latest
steps:
- name: Free disk space
# https://github.com/actions/virtual-environments/issues/709
run: |
sudo apt-get clean
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
df -h
- uses: earthly/actions-setup@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
version: "latest" # or pin to an specific version, e.g. "0.7.1"
use-cache: true
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: what version is installed?
run: earthly --version
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build everything with Earthly
run: |
earthly --remote-cache=ghcr.io/${{ github.repository }}:cache +all