-
-
Notifications
You must be signed in to change notification settings - Fork 14
140 lines (133 loc) · 4.15 KB
/
Copy pathbuild.yml
File metadata and controls
140 lines (133 loc) · 4.15 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
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
on: [push]
name: Build and Test
env:
RUST_TOOLCHAIN: nightly-2025-12-22
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install libasound2-dev
run: sudo apt-get install libasound2-dev
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- uses: cargo-bins/cargo-binstall@main
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
- run: cargo binstall cargo-make --no-confirm
- run: cargo make test-all
codecov:
needs: test
name: Code Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install libasound2-dev
run: sudo apt-get install libasound2-dev
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- uses: cargo-bins/cargo-binstall@main
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
- run: cargo binstall cargo-make --no-confirm
- run: cargo make codecov
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: twitchax/kord
build_linux:
needs: test
name: Build Linux
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Install libasound2-dev
run: sudo apt-get install libasound2-dev
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- uses: cargo-bins/cargo-binstall@main
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
- name: Install mold linker
run: |
sudo apt-get update
sudo apt-get install -y clang mold
- run: cargo binstall cargo-make --no-confirm
- run: cargo make build-linux
- uses: actions/upload-artifact@v4
with:
name: kord_x86_64-unknown-linux-gnu
path: target/x86_64-unknown-linux-gnu/release/kord
build_windows:
needs: test
name: Build Windows
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Install windows dependencies
run: sudo apt-get install mingw-w64 cmake
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
targets: x86_64-pc-windows-gnu
- uses: cargo-bins/cargo-binstall@main
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
- run: cargo binstall cargo-make --no-confirm
- run: cargo make build-windows
- uses: actions/upload-artifact@v4
with:
name: kord_x86_64-pc-windows-gnu
path: target/x86_64-pc-windows-gnu/release/kord.exe
build_macos:
needs: test
name: Build MacOS
runs-on: macos-14
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
targets: aarch64-apple-darwin
- uses: cargo-bins/cargo-binstall@main
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
- run: cargo binstall cargo-make --no-confirm
- run: cargo make build-macos
- uses: actions/upload-artifact@v4
with:
name: kord_aarch64-apple-darwin
path: target/aarch64-apple-darwin/release/kord
build_wasm:
needs: test
name: Build WASM
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
targets: wasm32-wasip2
- uses: cargo-bins/cargo-binstall@main
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
- run: cargo binstall cargo-make --no-confirm
- run: cargo make build-oci
- uses: actions/upload-artifact@v4
with:
name: kord_wasm32-wasip2
path: target/wasm32-wasip2/release/kord.wasm