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