-
Notifications
You must be signed in to change notification settings - Fork 8
80 lines (64 loc) · 2.1 KB
/
_native.yml
File metadata and controls
80 lines (64 loc) · 2.1 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
72
73
74
75
76
77
78
79
80
name: _Native Builds
on:
workflow_call:
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- name: Linux
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
binary: edge
asset: edge-linux-x86_64
- name: Windows
os: windows-latest
target: x86_64-pc-windows-msvc
binary: edge.exe
asset: edge-windows-x86_64.exe
- name: Mac
os: macos-latest
target: aarch64-apple-darwin
binary: edge
asset: edge-macos-aarch64
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
workspaces: compiler
- uses: dtolnay/rust-toolchain@stable
- name: Install target
run: rustup target add ${{ matrix.target }}
working-directory: compiler
- name: Build
run: cargo build --release --target ${{ matrix.target }}
working-directory: compiler
- name: Size
shell: bash
run: ls -lh target/${{ matrix.target }}/release/${{ matrix.binary }}
working-directory: compiler
- name: Test
run: cargo test
working-directory: compiler
- name: Install cargo-bloat
run: cargo install cargo-bloat
working-directory: compiler
- name: Bloat report
run: cargo bloat --release --target ${{ matrix.target }} --crates -n 7
working-directory: compiler
- name: Rename for release
if: startsWith(github.ref, 'refs/tags/')
shell: bash
run: cp compiler/target/${{ matrix.target }}/release/${{ matrix.binary }} ${{ matrix.asset }}
- name: Upload Native Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{ matrix.asset }}
fail_on_unmatched_files: true