blob: 7620a674451ef16f746632266cb9e94019d8a782 (
plain) (
blame)
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
|
name: Build
on:
push:
branches:
- master
jobs:
todos:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
rust: [stable]
steps:
- uses: hecrj/setup-rust-action@v1
with:
rust-version: ${{ matrix.rust }}
- uses: actions/checkout@master
- name: Enable Link Time Optimizations
run: |
echo "[profile.release]" >> Cargo.toml
echo "lto = true" >> Cargo.toml
- name: Build todos example
run: |
cargo build --verbose --release --example todos
- name: Archive todos binary (Windows)
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v1
with:
name: todos-windows
path: target/release/examples/todos.exe
- name: Archive todos binary (Linux)
if: matrix.os == 'linux-latest'
uses: actions/upload-artifact@v1
with:
name: todos-linux
path: target/release/examples/todos
- name: Archive todos binary (macOS)
if: matrix.os == 'macOS-latest'
uses: actions/upload-artifact@v1
with:
name: todos-macos
path: target/release/examples/todos
|