-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (47 loc) · 1.34 KB
/
ci.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
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
fail-fast: false
steps:
- name: Display Rust and Cargo versions
run: |
rustc -Vv
cargo -V
- uses: actions/checkout@v2
- name: Cache cargo build
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Install musl rust
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt install musl-tools
rustup target add x86_64-unknown-linux-musl
- name: Build binaries
if: runner.os == 'Linux'
run: |
cargo build --release --target=x86_64-unknown-linux-musl
ls target
ls target/*
ls target/x86_64-unknown-linux-musl/release/
ls target/release/
- name: Build binaries
if: runner.os == 'macOS'
run: cargo build --release
- uses: actions/upload-artifact@v2
if: runner.os == 'Linux'
with:
name: term-image-linux-musl-x86-64
path: target/x86_64-unknown-linux-musl/release/term-image
- uses: actions/upload-artifact@v2
if: runner.os == 'macOS'
with:
name: term-image-macos
path: target/release/term-image