@@ -30,37 +30,36 @@ jobs:
30
30
components : clippy
31
31
- run : cargo clippy -- -D warnings
32
32
33
- linux-build- test :
34
- name : Build and Test (Linux)
33
+ linux-test :
34
+ name : Test (Linux)
35
35
uses : ./.github/workflows/build-and-test.yml
36
36
with :
37
37
os : ubuntu-latest
38
- upload-artifact-name : notedeck-linux-bin
39
- upload-artifact-path : target/release/notedeck
40
38
additional-setup : |
41
39
sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev
42
40
43
- macos-build- test :
44
- name : Build and Test (macOS)
41
+ macos-test :
42
+ name : Test (macOS)
45
43
uses : ./.github/workflows/build-and-test.yml
46
44
with :
47
45
os : macos-latest
48
- upload-artifact-name : notedeck-macos-bin
49
- upload-artifact-path : target/release/notedeck
50
46
51
- windows-build- test :
52
- name : Build and Test (Windows)
47
+ windows-test :
48
+ name : Test (Windows)
53
49
uses : ./.github/workflows/build-and-test.yml
54
50
with :
55
51
os : windows-latest
56
- upload-artifact-name : notedeck.exe
57
- upload-artifact-path : target/release/notedeck.exe
58
52
59
53
packaging :
60
- name : Build Linux Packages
54
+ name : rpm/deb
61
55
runs-on : ubuntu-latest
62
- needs : linux-build-test
63
- if : github.ref_name == 'master'
56
+ needs : linux-test
57
+ # if: github.ref_name == 'master'
58
+
59
+ strategy :
60
+ matrix :
61
+ arch : [x86_64, aarch64]
62
+
64
63
steps :
65
64
# Checkout the repository
66
65
- name : Checkout Code
@@ -70,69 +69,64 @@ jobs:
70
69
- name : Install Packaging Tools
71
70
run : |
72
71
sudo apt-get update
73
- sudo apt-get install -y rpm binutils
72
+ sudo apt-get install -y rpm binutils gcc-${{ matrix.arch }}-linux-gnu
74
73
cargo install cargo-generate-rpm cargo-deb
74
+ rustup target add ${{ matrix.arch }}-unknown-linux-gnu
75
75
76
- # download!
77
- - name : Download Build Artifacts
78
- uses : actions/download-artifact@v4
79
- with :
80
- name : notedeck-linux-bin
81
- path : target/release
76
+ # Build
77
+ - name : Build (${{ matrix.arch }})
78
+ run : |
79
+ cargo build --release --target=${{ matrix.arch }}-unknown-linux-gnu
82
80
83
- # Build Packages
84
- - name : Build Packages
81
+ # Build RPM Package
82
+ - name : Build RPM Package
85
83
run : |
86
- cargo generate-rpm
87
- cargo deb
84
+ cargo generate-rpm --target=${{ matrix.arch }}-unknown-linux-gnu
85
+
86
+ # Build Debian Package
87
+ - name : Build Debian Package
88
+ run : |
89
+ cargo deb --target=${{ matrix.arch }}-unknown-linux-gnu
88
90
89
91
# Upload RPM Package
90
92
- name : Upload RPM Package
91
93
uses : actions/upload-artifact@v4
92
94
with :
93
- name : notedeck .rpm
94
- path : target/generate-rpm/*.rpm
95
+ name : ${{ inputs.artifact-name }}-${{ matrix.arch }} .rpm
96
+ path : target/${{ matrix.arch }}-unknown-linux-gnu/ generate-rpm/*.rpm
95
97
96
98
# Upload Debian Package
97
99
- name : Upload Debian Package
98
100
uses : actions/upload-artifact@v4
99
101
with :
100
- name : notedeck .deb
101
- path : target/debian/*.deb
102
+ name : ${{ inputs.artifact-name }}-${{ inputs.arch }} .deb
103
+ path : target/${{ matrix.arch }}-unknown-linux-gnu/ debian/*.deb
102
104
103
105
macos-dmg :
104
- name : Build macOS DMG
106
+ name : macOS dmg
105
107
runs-on : macos-latest
106
- needs : macos-build- test
107
- if : github.ref_name == 'master'
108
+ needs : macos-test
109
+ # if: github.ref_name == 'master'
108
110
env :
109
111
NOTEDECK_APPLE_RELEASE_CERT_ID : ${{ secrets.NOTEDECK_APPLE_RELEASE_CERT_ID }}
110
112
NOTEDECK_RELEASE_APPLE_ID : ${{ secrets.NOTEDECK_RELEASE_APPLE_ID }}
111
113
NOTEDECK_APPLE_APP_SPECIFIC_PW : ${{ secrets.NOTEDECK_APPLE_APP_SPECIFIC_PW }}
112
114
NOTEDECK_APPLE_TEAM_ID : ${{ secrets.NOTEDECK_APPLE_TEAM_ID }}
115
+
116
+ strategy :
117
+ matrix :
118
+ arch : [x86_64, aarch64]
119
+
113
120
steps :
114
121
# Checkout the repository
115
122
- name : Checkout Code
116
123
uses : actions/checkout@v4
117
124
118
- # Set up Rust
119
- - name : Setup Rust
120
- uses : dtolnay/rust-toolchain@stable
121
-
122
- # create-dmg and cargo-bundle caching
123
- - name : Rust cache
124
- uses : Swatinem/rust-cache@v2
125
-
126
- - name : Download Build Artifacts (MacOS)
127
- uses : actions/download-artifact@v4
128
- with :
129
- name : notedeck-macos-bin # Assuming you need the Release build
130
- path : target/release
131
-
132
125
- name : Install Required Tools
133
126
run : |
134
127
brew install create-dmg
135
128
cargo install cargo-bundle
129
+ rustup target add ${{ matrix.arch }}-apple-darwin
136
130
137
131
- name : Import apple codesign cert
138
132
uses : apple-actions/import-codesign-certs@v3
@@ -141,30 +135,24 @@ jobs:
141
135
p12-password : ${{ secrets.CERTIFICATES_P12_PASSWORD }}
142
136
143
137
- name : Run macOS DMG Build Script
144
- run : ./scripts/macos_build.sh
138
+ run : ARCH=${{ matrix.arch }} ./scripts/macos_build.sh
145
139
146
140
- name : Upload DMG Artifact
147
141
uses : actions/upload-artifact@v4
148
142
with :
149
- name : notedeck.dmg
150
- path : packages/notedeck.dmg
143
+ name : notedeck-${{ matrix.arch }} .dmg
144
+ path : packages/notedeck-${{ matrix.arch }} .dmg
151
145
152
146
windows-installer :
153
147
name : Build Windows Installer
154
148
runs-on : windows-latest
155
- needs : windows-build- test
149
+ needs : windows-test
156
150
if : github.ref_name == 'master'
157
151
steps :
158
152
# Checkout the repository
159
153
- name : Checkout Code
160
154
uses : actions/checkout@v4
161
155
162
- - name : Download Build Artifacts
163
- uses : actions/download-artifact@v4
164
- with :
165
- name : notedeck.exe # Assuming you need the Release build
166
- path : target/release
167
-
168
156
# Create packages directory
169
157
- name : Create packages directory
170
158
run : mkdir packages
@@ -173,13 +161,6 @@ jobs:
173
161
- name : Install Inno Setup
174
162
run : choco install innosetup --no-progress --yes
175
163
176
- # Validate executable exists
177
- - name : Validate required files
178
- run : |
179
- if (!(Test-Path -Path target\release\notedeck.exe)) {
180
- throw "Executable 'notedeck.exe' not found in 'target/release'."
181
- }
182
-
183
164
# Build Installer
184
165
- name : Run Inno Setup Script
185
166
run : |
@@ -195,3 +176,4 @@ jobs:
195
176
with :
196
177
name : DamusNotedeckInstaller.exe
197
178
path : packages\DamusNotedeckInstaller.exe
179
+
0 commit comments