-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (41 loc) · 1.46 KB
/
ci.yml
File metadata and controls
51 lines (41 loc) · 1.46 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
name: CI
on: [push, pull_request]
jobs:
ci:
name: Build ${{ matrix.rust }}/${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
rust: [stable, beta, nightly]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Build crate
uses: actions-rs/cargo@v1
with:
command: build
args: --release --all-features
- name: Build target archive (windows)
if: runner.os == 'Windows'
run: tar -C target\\release -czf kcpu-rust-${{ matrix.rust }}-target-${{ matrix.os }}.tar.gz libkcpu.rlib kcpu.exe kasm.exe kcpu-vm.exe
- name: Build target archive (non-windows)
if: runner.os != 'Windows'
run: tar -C target/release -czf kcpu-rust-${{ matrix.rust }}-target-${{ matrix.os }}.tar.gz libkcpu.rlib kcpu kasm kcpu-vm
- name: Upload target archive
uses: actions/upload-artifact@v2
with:
name: kcpu-rust-${{ matrix.rust }}-target-${{ matrix.os }}
path: kcpu-rust-${{ matrix.rust }}-target-${{ matrix.os }}.tar.gz
- name: Test crate
uses: actions-rs/cargo@v1
with:
command: test
args: --release --all-features