blob: 26771d7b1ee3a206a1aac5b246cb49b77d04089f (
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
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 and strip debug symbols
run: |
echo "[profile.release]" >> Cargo.toml
echo "lto = true" >> Cargo.toml
echo "debug = false" >> Cargo.toml
- name: Add .deb package metadata
run: |
echo '[package.metadata.deb.variants.todos]' >> Cargo.toml
echo 'extended-description = "A simple Todo app built with Iced, a cross-platform GUI library for Rust"' >> Cargo.toml
echo 'assets = [["target/release/examples/todos", "usr/bin/", "755"]]' >> Cargo.toml
- name: Build todos binary
run: cargo build --verbose --release --locked --example todos
- name: Build todos .deb package
run: cargo deb --variant todos -- --locked --example todos
- name: Rename todos .deb package
run: mv target/debian/*.deb target/debian/iced_todos-x86_64-debian-linux-gnu.deb
- name: Archive todos binary
uses: actions/upload-artifact@v1
with:
name: todos-x86_64-unknown-linux-gnu
path: target/release/examples/todos
- 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 and strip debug symbols
run: |
echo "[profile.release]" >> Cargo.toml
echo "lto = true" >> Cargo.toml
echo "debug = false" >> Cargo.toml
- name: Build todos binary
run: cargo build --verbose --release --locked --example todos
- name: Archive todos binary
uses: actions/upload-artifact@v1
with:
name: todos-x86_64-pc-windows-msvc
path: target/release/examples/todos.exe
todos_macos:
runs-on: macOS-latest
steps:
- uses: hecrj/setup-rust-action@v1
- uses: actions/checkout@master
- name: Enable Link Time Optimizations and strip debug symbols
run: |
echo "[profile.release]" >> Cargo.toml
echo "lto = true" >> Cargo.toml
echo "debug = false" >> Cargo.toml
- name: Build todos binary
env:
MACOSX_DEPLOYMENT_TARGET: 10.7
run: cargo build --verbose --release --locked --example todos
- name: Archive todos binary
uses: actions/upload-artifact@v1
with:
name: todos-x86_64-apple-darwin
path: target/release/examples/todos
|