-
Notifications
You must be signed in to change notification settings - Fork 104
64 lines (52 loc) · 1.52 KB
/
pr-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
56
57
58
59
60
61
62
63
64
name: "pr-build"
env:
# See: https://github.com/marketplace/actions/sccache-action
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
on:
workflow_dispatch:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
# Clone repository
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.63
override: true
default: true
# Use rust-cache to cache dependencies, which is a large chunk of the build.
- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
# Don't cache ./target, as it takes tons of space, rely on sccache instead.
cache-targets: false
# We set a shared key, as our cache is reusable between jobs
shared-key: rust-cargo
workspaces: lib/rust
# Use sccache to cache everything else.
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- uses: actions/setup-java@v3
with:
distribution: corretto
java-version: 11
- uses: gradle/gradle-build-action@v2
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- run: |
python -m pip install cargo-lambda
- name: Build
shell: bash
run: |
make -j package
# - uses: actions/upload-artifact@v3
# with:
# name: build-assets
# path: "matano*.sh*"