-
Notifications
You must be signed in to change notification settings - Fork 9
54 lines (47 loc) · 1.36 KB
/
prebuild.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
name: PR Pre-Build
on:
workflow_call:
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Pre-Build ENState 🔨
runs-on: ubuntu-latest
env:
SCCACHE_GHA_ENABLED: "on"
RUSTC_WRAPPER: "sccache"
strategy:
fail-fast: false
matrix:
suite: [server] #, worker]
include:
- suite: server
build: cargo build --release
env_file: .env
# - suite: worker
# build: bun install --global pnpm && pnpm install && pnpm build
# env_file: .dev.vars
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: oven-sh/setup-bun@v1
- name: Configure sccache
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
with:
version: "v0.7.4"
- name: Build
run: ${{ matrix.build }}
working-directory: ${{ matrix.suite }}
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: enstate-server
path: server/target/release/enstate
retention-days: 1