iced/.github/workflows/build.yml
Héctor Ramón Jiménez 92af1b1c12 Fix todos build workflow
2020-01-21 00:37:57 +01:00

74 lines
2.3 KiB
YAML

name: Build
on:
push:
branches:
- master
jobs:
todos_linux:
runs-on: ubuntu-latest
steps:
- uses: hecrj/setup-rust-action@v1
- name: Install cargo-deb
run: cargo install cargo-deb
- uses: actions/checkout@master
- name: Enable Link Time Optimizations
run: |
echo "[profile.release]" >> Cargo.toml
echo "lto = true" >> Cargo.toml
- name: Build todos binary
run: cargo build --verbose --release --package todos
- name: Archive todos binary
uses: actions/upload-artifact@v1
with:
name: todos-x86_64-unknown-linux-gnu
path: target/release/todos
- name: Pack todos .deb package
run: cargo deb --no-build --package todos
- name: Rename todos .deb package
run: mv target/debian/*.deb target/debian/iced_todos-x86_64-debian-linux-gnu.deb
- name: Archive todos .deb package
uses: actions/upload-artifact@v1
with:
name: todos-x86_64-debian-linux-gnu
path: target/debian/iced_todos-x86_64-debian-linux-gnu.deb
todos_windows:
runs-on: windows-latest
steps:
- uses: hecrj/setup-rust-action@v1
- uses: actions/checkout@master
- name: Enable Link Time Optimizations
run: |
echo "[profile.release]" >> Cargo.toml
echo "lto = true" >> Cargo.toml
- name: Enable static CRT linkage
run: |
mkdir .cargo
echo '[target.x86_64-pc-windows-msvc]' >> .cargo/config
echo 'rustflags = ["-Ctarget-feature=+crt-static"]' >> .cargo/config
- name: Build todos binary
run: cargo build --verbose --release --package todos
- name: Archive todos binary
uses: actions/upload-artifact@v1
with:
name: todos-x86_64-pc-windows-msvc
path: target/release/todos.exe
todos_macos:
runs-on: macOS-latest
steps:
- uses: hecrj/setup-rust-action@v1
- uses: actions/checkout@master
- name: Enable Link Time Optimizations
run: |
echo "[profile.release]" >> Cargo.toml
echo "lto = true" >> Cargo.toml
- name: Build todos binary
env:
MACOSX_DEPLOYMENT_TARGET: 10.14
run: cargo build --verbose --release --package todos
- name: Archive todos binary
uses: actions/upload-artifact@v1
with:
name: todos-x86_64-apple-darwin
path: target/release/todos