Add Build workflow to generate todos binaries
This commit is contained in:
parent
b59b5ad0e9
commit
32b7ca1443
1 changed files with 35 additions and 0 deletions
35
.github/workflows/build.yml
vendored
Normal file
35
.github/workflows/build.yml
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
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 }}
|
||||
- name: Enable Link Time Optimizations
|
||||
run: |
|
||||
echo -e "[profile.release]\nlto = true" >> Cargo.toml
|
||||
- uses: actions/checkout@master
|
||||
- name: Build todos example
|
||||
run: |
|
||||
cargo build --verbose --release --example todos
|
||||
- name: Archive todos binary
|
||||
if: matrix.os == 'windows-latest'
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: todos
|
||||
path: target/release/examples/todos.exe
|
||||
- name: Archive todos binary
|
||||
if: matrix.os != 'windows-latest'
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: todos
|
||||
path: target/release/examples/todos
|
||||
Loading…
Add table
Add a link
Reference in a new issue