forked from 0xMiden/midenup
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (67 loc) · 2.02 KB
/
Copy pathintegration.yml
File metadata and controls
71 lines (67 loc) · 2.02 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
64
65
66
67
68
69
70
71
name: Integration
on:
push:
branches: [main, next]
paths-ignore:
- "**.md"
- "**.txt"
- "manifest/**"
- "docs/**"
pull_request:
types: [opened, reopened, synchronize, labeled, unlabeled]
paths-ignore:
- "**.md"
- "**.txt"
- "manifest/**"
- "docs/**"
env:
# Set the new value when the cache grows too much and we hit the runner's disk space limit
# via https://github.com/rust-lang/docs.rs/pull/2433
RUST_CACHE_KEY: rust-cache-20260312
jobs:
build:
name: build
runs-on: ubuntu-latest
permissions:
contents: write
artifact-metadata: write
steps:
- uses: actions/checkout@v5
- name: Cache Cargo
uses: Swatinem/rust-cache@v2
with:
# Use a common cache for the basic compilation/formatter/clippy checks
shared-key: ${{ github.workflow }}-shared
prefix-key: ${{ env.RUST_CACHE_KEY }}
# Only update the cache on push onto the main branch. This strikes a nice balance between
# cache hits and cache evictions (github has a 10GB cache limit).
save-if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
- name: Build
run: |
rustup update --no-self-update
make build-release
- name: Upload
uses: actions/upload-artifact@v4
with:
name: midenup_exe
path: target/release/midenup
install-stable:
name: Install the stable toolchain via the CLI
needs: [build]
runs-on: ubuntu-latest
permissions:
contents: read
if: ${{ github.ref_name == 'main' || contains(github.event.pull_request.labels.*.name, 'check:install') }}
steps:
- uses: actions/checkout@v4
- name: Download midenup executable
uses: actions/download-artifact@v4
with:
name: midenup_exe
path: .
- name: Mark midenup as executable
run: |
chmod +x midenup
- name: install stable
run: |
./midenup install stable