-
Notifications
You must be signed in to change notification settings - Fork 7
97 lines (92 loc) · 3.16 KB
/
release.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Release
on:
push:
tags:
- test
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
release-linux-binaries:
runs-on: ubuntu-20.04
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Configure build cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
- name: Build the binaries
uses: addnab/docker-run-action@v3
with:
image: registry.gitlab.com/rust_musl_docker/image:stable-latest
options: -v ${{ github.workspace }}:/workdir -v /home/runner/.cargo/git:/root/.cargo/git -v /home/runner/.cargo/registry:/root/.cargo/registry
run: |
rustup target add x86_64-unknown-linux-musl
cargo build --release --target=x86_64-unknown-linux-musl
cp target/x86_64-unknown-linux-musl/release/complgen complgen-x86_64-unknown-linux-musl
- uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
files: |
complgen-x86_64-unknown-linux-musl
release-arm-linux-binaries:
runs-on: ubuntu-20.04
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Configure build cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
- name: Build the binaries
uses: addnab/docker-run-action@v3
with:
image: messense/rust-musl-cross:aarch64-musl
options: -v ${{ github.workspace }}:/home/rust/src -v /home/runner/.cargo/git:/root/.cargo/git -v /home/runner/.cargo/registry:/root/.cargo/registry
run: |
rustup target add aarch64-unknown-linux-musl
cargo build --release
cp target/aarch64-unknown-linux-musl/release/complgen complgen-aarch64-unknown-linux-musl
- uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
files: |
complgen-aarch64-unknown-linux-musl
release-macos-binaries:
runs-on: macos-11
strategy:
matrix:
target:
- x86_64-apple-darwin
- aarch64-apple-darwin
steps:
- uses: actions/checkout@v2
- name: Configure build cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
target: ${{ matrix.target }}
- name: Build the release binaries
run: |
cargo build --release --target ${{ matrix.target }}
cp target/${{ matrix.target }}/release/complgen complgen-${{ matrix.target }}
- uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
files: |
complgen-${{ matrix.target }}