@@ -37,85 +37,36 @@ jobs:
37
37
command : clippy
38
38
args : -- -D warnings
39
39
40
- build-and-test :
41
- name : Build and Test (${{ matrix.os }})
42
- runs-on : ${{ matrix.os }}
43
- strategy :
44
- matrix :
45
- os : [ubuntu-latest, windows-latest, macos-latest]
46
- toolchain : [stable]
47
- steps :
48
- # Checkout the repository
49
- - name : Checkout Code
50
- uses : actions/checkout@v2
51
-
52
- # Set up the Rust toolchain
53
- - name : Setup Rust
54
- uses : actions-rs/toolchain@v1
55
- with :
56
- profile : minimal
57
- toolchain : ${{ matrix.toolchain }}
58
- override : true
59
-
60
- # Cache
61
- - name : Rust cache
62
- uses : Swatinem/rust-cache@v2
63
-
64
- # Install dependencies (only for Ubuntu)
65
- - name : Install Dependencies (Ubuntu)
66
- if : runner.os == 'Linux'
67
- run : sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev
68
-
69
- # Run tests
70
- - name : Run Tests
71
- uses : actions-rs/cargo@v1
72
- with :
73
- command : test
74
- args : --release
75
-
76
- # Build
77
- - name : Build
78
- uses : actions-rs/cargo@v1
79
- with :
80
- command : build
81
- args : --release
82
-
83
- # Strip Debug Symbols
84
- #
85
- # # > Don't strip for now <
86
- #
87
- # - name: Strip Debug Symbols
88
- # if: runner.os == 'Linux'
89
- # run: strip target/release/notedeck || echo "Skipping strip if not applicable"
90
-
91
- # Upload bin for further packaging steps
92
- - name : Upload Build Artifacts (Linux)
93
- if : runner.os == 'Linux'
94
- uses : actions/upload-artifact@v4
95
- with :
96
- name : notedeck-linux-bin
97
- path : target/release/notedeck
98
-
99
- # Upload artifacts (for macOS, adjust paths as needed)
100
- - name : Upload Build Artifacts (macOS)
101
- if : runner.os == 'macOS'
102
- uses : actions/upload-artifact@v4
103
- with :
104
- name : notedeck-macos-bin
105
- path : target/release/notedeck
106
-
107
- # Upload exe for further packaging steps
108
- - name : Upload Build Artifacts (Windows)
109
- if : runner.os == 'Windows'
110
- uses : actions/upload-artifact@v4
111
- with :
112
- name : notedeck.exe
113
- path : target/release/notedeck.exe
40
+ linux-build-test :
41
+ name : Build and Test (Linux)
42
+ uses : ./.github/workflows/build-and-test.yml
43
+ with :
44
+ os : ubuntu-latest
45
+ upload-artifact-name : notedeck-linux-bin
46
+ upload-artifact-path : target/release/notedeck
47
+ additional-setup : |
48
+ sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev
49
+
50
+ macos-build-test :
51
+ name : Build and Test (macOS)
52
+ uses : ./.github/workflows/build-and-test.yml
53
+ with :
54
+ os : macos-latest
55
+ upload-artifact-name : notedeck-macos-bin
56
+ upload-artifact-path : target/release/notedeck
57
+
58
+ windows-build-test :
59
+ name : Build and Test (Windows)
60
+ uses : ./.github/workflows/build-and-test.yml
61
+ with :
62
+ os : windows-latest
63
+ upload-artifact-name : notedeck.exe
64
+ upload-artifact-path : target/release/notedeck.exe
114
65
115
66
packaging :
116
67
name : Build Linux Packages
117
68
runs-on : ubuntu-latest
118
- needs : build-and -test
69
+ needs : linux-build -test
119
70
steps :
120
71
# Checkout the repository
121
72
- name : Checkout Code
@@ -161,7 +112,7 @@ jobs:
161
112
macos-dmg :
162
113
name : Build macOS DMG
163
114
runs-on : macos-latest
164
- needs : build-and -test
115
+ needs : macos-build -test
165
116
env :
166
117
NOTEDECK_APPLE_RELEASE_CERT_ID : ${{ secrets.NOTEDECK_APPLE_RELEASE_CERT_ID }}
167
118
NOTEDECK_RELEASE_APPLE_ID : ${{ secrets.NOTEDECK_RELEASE_APPLE_ID }}
@@ -180,6 +131,10 @@ jobs:
180
131
toolchain : stable
181
132
override : true
182
133
134
+ # create-dmg and cargo-bundle caching
135
+ - name : Rust cache
136
+ uses : Swatinem/rust-cache@v2
137
+
183
138
- name : Download Build Artifacts (MacOS)
184
139
uses : actions/download-artifact@v4
185
140
with :
@@ -209,7 +164,7 @@ jobs:
209
164
windows-installer :
210
165
name : Build Windows Installer
211
166
runs-on : windows-latest
212
- needs : build-and -test
167
+ needs : windows-build -test
213
168
steps :
214
169
# Checkout the repository
215
170
- name : Checkout Code
0 commit comments