@@ -30,37 +30,37 @@ 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
+ fail-fast : false
61
+ matrix :
62
+ arch : [x86_64, aarch64]
63
+
64
64
steps :
65
65
# Checkout the repository
66
66
- name : Checkout Code
@@ -70,69 +70,69 @@ jobs:
70
70
- name : Install Packaging Tools
71
71
run : |
72
72
sudo apt-get update
73
- sudo apt-get install -y rpm binutils
73
+ if [ "${{ matrix.arch }}" = "x86_64" ]; then
74
+ sudo apt-get install -y gcc-aarch64-linux-gnu
75
+ else
76
+ sudo apt-get install -y gcc-x86_64-linux-gnu
77
+ fi
74
78
cargo install cargo-generate-rpm cargo-deb
79
+ rustup target add ${{ matrix.arch }}-unknown-linux-gnu
75
80
76
- # download!
77
- - name : Download Build Artifacts
78
- uses : actions/download-artifact@v4
79
- with :
80
- name : notedeck-linux-bin
81
- path : target/release
81
+ # Build
82
+ - name : Build (${{ matrix.arch }})
83
+ run : |
84
+ cargo build --release --target=${{ matrix.arch }}-unknown-linux-gnu
82
85
83
- # Build Packages
84
- - name : Build Packages
86
+ # Build RPM Package
87
+ - name : Build RPM Package
85
88
run : |
86
- cargo generate-rpm
87
- cargo deb
89
+ cargo generate-rpm --target=${{ matrix.arch }}-unknown-linux-gnu
90
+
91
+ # Build Debian Package
92
+ - name : Build Debian Package
93
+ run : |
94
+ cargo deb --target=${{ matrix.arch }}-unknown-linux-gnu
88
95
89
96
# Upload RPM Package
90
97
- name : Upload RPM Package
91
98
uses : actions/upload-artifact@v4
92
99
with :
93
- name : notedeck .rpm
94
- path : target/generate-rpm/*.rpm
100
+ name : ${{ inputs.artifact-name }}-${{ matrix.arch }} .rpm
101
+ path : target/${{ matrix.arch }}-unknown-linux-gnu/ generate-rpm/*.rpm
95
102
96
103
# Upload Debian Package
97
104
- name : Upload Debian Package
98
105
uses : actions/upload-artifact@v4
99
106
with :
100
- name : notedeck .deb
101
- path : target/debian/*.deb
107
+ name : ${{ inputs.artifact-name }}-${{ inputs.arch }} .deb
108
+ path : target/${{ matrix.arch }}-unknown-linux-gnu/ debian/*.deb
102
109
103
110
macos-dmg :
104
- name : Build macOS DMG
111
+ name : macOS dmg
105
112
runs-on : macos-latest
106
- needs : macos-build- test
107
- if : github.ref_name == 'master'
113
+ needs : macos-test
114
+ # if: github.ref_name == 'master'
108
115
env :
109
116
NOTEDECK_APPLE_RELEASE_CERT_ID : ${{ secrets.NOTEDECK_APPLE_RELEASE_CERT_ID }}
110
117
NOTEDECK_RELEASE_APPLE_ID : ${{ secrets.NOTEDECK_RELEASE_APPLE_ID }}
111
118
NOTEDECK_APPLE_APP_SPECIFIC_PW : ${{ secrets.NOTEDECK_APPLE_APP_SPECIFIC_PW }}
112
119
NOTEDECK_APPLE_TEAM_ID : ${{ secrets.NOTEDECK_APPLE_TEAM_ID }}
120
+
121
+ strategy :
122
+ fail-fast : false
123
+ matrix :
124
+ arch : [x86_64, aarch64]
125
+
113
126
steps :
114
127
# Checkout the repository
115
128
- name : Checkout Code
116
129
uses : actions/checkout@v4
117
130
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
131
- name : Install Required Tools
133
132
run : |
134
133
brew install create-dmg
135
134
cargo install cargo-bundle
135
+ rustup target add ${{ matrix.arch }}-apple-darwin
136
136
137
137
- name : Import apple codesign cert
138
138
uses : apple-actions/import-codesign-certs@v3
@@ -141,30 +141,24 @@ jobs:
141
141
p12-password : ${{ secrets.CERTIFICATES_P12_PASSWORD }}
142
142
143
143
- name : Run macOS DMG Build Script
144
- run : ./scripts/macos_build.sh
144
+ run : ARCH=${{ matrix.arch }} ./scripts/macos_build.sh
145
145
146
146
- name : Upload DMG Artifact
147
147
uses : actions/upload-artifact@v4
148
148
with :
149
- name : notedeck.dmg
150
- path : packages/notedeck.dmg
149
+ name : notedeck-${{ matrix.arch }} .dmg
150
+ path : packages/notedeck-${{ matrix.arch }} .dmg
151
151
152
152
windows-installer :
153
153
name : Build Windows Installer
154
154
runs-on : windows-latest
155
- needs : windows-build- test
155
+ needs : windows-test
156
156
if : github.ref_name == 'master'
157
157
steps :
158
158
# Checkout the repository
159
159
- name : Checkout Code
160
160
uses : actions/checkout@v4
161
161
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
162
# Create packages directory
169
163
- name : Create packages directory
170
164
run : mkdir packages
@@ -173,13 +167,6 @@ jobs:
173
167
- name : Install Inno Setup
174
168
run : choco install innosetup --no-progress --yes
175
169
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
170
# Build Installer
184
171
- name : Run Inno Setup Script
185
172
run : |
@@ -195,3 +182,4 @@ jobs:
195
182
with :
196
183
name : DamusNotedeckInstaller.exe
197
184
path : packages\DamusNotedeckInstaller.exe
185
+
0 commit comments