Skip to content

Commit 28c9132

Browse files
committed
Add support for additional platforms
This change updates the release process to provide builds for Arm based systems, as well as several different Linux distros, and an RPM release. Supported operating systems: Alpine, Arch, Debian, Fedora, Pi 0-5, Ubuntu, macOS, Windows Supported architectures: arm64, amd64, arm (Pi 0-1), armv7 (Pi 2-4)
1 parent 0f0e5dc commit 28c9132

File tree

7 files changed

+407
-293
lines changed

7 files changed

+407
-293
lines changed

.github/workflows/master-coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
crate: cargo-tarpaulin
2121
- name: Run cargo-tarpaulin
2222
run: |
23-
cargo +nightly tarpaulin --all-features --ignore-tests --line --output-dir coverage --timeout 10 --out Lcov
23+
cargo +nightly tarpaulin --ignore-tests --line --output-dir coverage --timeout 10 --out Lcov
2424
- name: Post to Coveralls
2525
uses: coverallsapp/github-action@v2
2626
with:

.github/workflows/pull-request.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
steps:
4343
- uses: actions/checkout@v3
4444
- uses: dtolnay/rust-toolchain@stable
45-
- run: cargo doc --all-features
45+
- run: cargo doc
4646
format:
4747
runs-on: ubuntu-latest
4848
timeout-minutes: 10
@@ -71,7 +71,7 @@ jobs:
7171
crate: cargo-tarpaulin
7272
- name: Run cargo-tarpaulin
7373
run: |
74-
cargo +nightly tarpaulin --all-features --ignore-tests --line --output-dir coverage --timeout 10 --out Lcov
74+
cargo +nightly tarpaulin --ignore-tests --line --output-dir coverage --timeout 10 --out Lcov
7575
- name: Post to Coveralls
7676
uses: coverallsapp/github-action@v2
7777
with:

.github/workflows/release-latest.yml

Lines changed: 105 additions & 161 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ on:
77

88
jobs:
99
update-latest-tag:
10-
runs-on: ubuntu-latest
1110
name: Update Latest Tag
11+
runs-on: ubuntu-latest
1212
env:
1313
TARGET_RELEASE_ID: 18843342
1414
GITHUB_ACCESS_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
@@ -19,67 +19,54 @@ jobs:
1919
- name: "Update Tag and Title"
2020
run: "./.github/scripts/update-tag.bash"
2121

22-
debian:
23-
name: Debian Latest
22+
deb:
23+
name: "Release Latest - ${{ matrix.platform.name }}"
24+
continue-on-error: true
25+
strategy:
26+
matrix:
27+
platform:
28+
- name: ubuntu_arm64
29+
target: aarch64-unknown-linux-gnu
30+
image: ubuntu:24.04
31+
- name: ubuntu_amd64
32+
target: x86_64-unknown-linux-gnu
33+
image: ubuntu:24.04
34+
35+
- name: debian_arm64
36+
target: aarch64-unknown-linux-gnu
37+
image: debian:sid-slim
38+
- name: debian_amd64
39+
target: x86_64-unknown-linux-gnu
40+
image: debian:sid-slim
2441
runs-on: ubuntu-latest
2542
needs: update-latest-tag
2643
timeout-minutes: 10
27-
container:
28-
image: 'docker://debian:sid-slim'
2944
steps:
30-
- uses: actions/checkout@v3
31-
- name: "System Setup"
32-
run: |
33-
apt-get update;
34-
apt-get --assume-yes -f install curl build-essential pkg-config;
35-
env:
36-
DEBIAN_FRONTEND: noninteractive
37-
TZ: "America/St_Johns"
45+
- uses: actions/checkout@v4
46+
- name: Cache
47+
uses: Swatinem/rust-cache@v2
3848
- uses: dtolnay/rust-toolchain@master
3949
with:
4050
toolchain: nightly
4151
- uses: baptiste0928/cargo-install@v2
4252
with:
4353
crate: cargo-deb
44-
- name: "Build Deb"
45-
run: cargo +nightly deb --output "target/debian/debian_amd64-interactive-rebase-tool.deb" -- --features dev
46-
- name: Upload
47-
uses: ncipollo/release-action@v1
48-
with:
49-
tag: latest
50-
allowUpdates: true
51-
artifacts: "target/debian/debian_amd64-interactive-rebase-tool.deb"
52-
artifactErrorsFailBuild: true
53-
artifactContentType: "application/vnd.debian.binary-package"
54-
replacesArtifacts: true
55-
omitBodyDuringUpdate: true
56-
omitDraftDuringUpdate: true
57-
omitNameDuringUpdate: true
58-
makeLatest: false
59-
prerelease: true
60-
updateOnlyUnreleased: true
61-
62-
ubuntu:
63-
name: Ubuntu Latest
64-
runs-on: ubuntu-latest
65-
needs: update-latest-tag
66-
timeout-minutes: 10
67-
steps:
68-
- uses: actions/checkout@v3
69-
- uses: dtolnay/rust-toolchain@master
54+
- name: Build
55+
uses: houseabsolute/actions-rust-cross@v0
7056
with:
57+
command: build
58+
target: ${{ matrix.platform.target }}
7159
toolchain: nightly
72-
- uses: baptiste0928/cargo-install@v2
73-
with:
74-
crate: cargo-deb
60+
args: "--release --features dev"
61+
7562
- name: "Build Deb"
76-
run: cargo +nightly deb --output "target/debian/ubuntu_amd64-interactive-rebase-tool.deb" -- --features dev
63+
run: cargo +nightly deb --no-strip --no-build --target ${{ matrix.platform.target }} --output "target/git-interactive-rebase-tool-unstable-${{ matrix.platform.name }}.deb"
7764
- name: Upload
7865
uses: ncipollo/release-action@v1
7966
with:
8067
tag: latest
8168
allowUpdates: true
82-
artifacts: "target/debian/ubuntu_amd64-interactive-rebase-tool.deb"
69+
artifacts: "target/git-interactive-rebase-tool-unstable-${{ matrix.platform.name }}.deb"
8370
artifactErrorsFailBuild: true
8471
artifactContentType: "application/vnd.debian.binary-package"
8572
replacesArtifacts: true
@@ -90,61 +77,60 @@ jobs:
9077
prerelease: true
9178
updateOnlyUnreleased: true
9279

93-
alpine:
94-
name: Alpine Latest
95-
runs-on: ubuntu-latest
80+
linux-other:
81+
name: "Release Latest - ${{ matrix.platform.name }}"
82+
continue-on-error: true
83+
strategy:
84+
matrix:
85+
platform:
86+
# Alpine
87+
- name: alpine-arm64
88+
target: aarch64-unknown-linux-gnu
89+
features: "zlib-ng-compat"
90+
- name: alpine-amd64
91+
target: x86_64-unknown-linux-gnu
92+
# Arch
93+
- name: arch-arm64
94+
target: aarch64-unknown-linux-gnu
95+
features: "zlib-ng-compat"
96+
- name: arch-amd64
97+
target: x86_64-unknown-linux-gnu
98+
# Fedora
99+
- name: fedora-arm64
100+
target: aarch64-unknown-linux-gnu
101+
features: "zlib-ng-compat"
102+
- name: fedora-amd64
103+
target: x86_64-unknown-linux-gnu
104+
# Raspberry PI
105+
- name: pi0-1_arm
106+
target: arm-unknown-linux-gnueabihf
107+
- name: pi2-4_armv7
108+
target: armv7-unknown-linux-gnueabihf
109+
features: "zlib-ng-compat"
110+
- name: pi5_arm64
111+
target: aarch64-unknown-linux-gnu
112+
features: "zlib-ng-compat"
96113
needs: update-latest-tag
97-
container:
98-
image: 'docker://rust:alpine'
99-
steps:
100-
- uses: actions/checkout@v3
101-
- run: |
102-
apk update
103-
apk upgrade
104-
apk add bash musl-dev zlib-dev zlib-static
105-
- uses: dtolnay/rust-toolchain@master
106-
with:
107-
toolchain: nightly
108-
- name: "Build"
109-
run: |
110-
cargo build --features dev
111-
cp target/debug/interactive-rebase-tool target/debug/alpine_amd64-interactive-rebase-tool
112-
- name: Upload
113-
uses: ncipollo/release-action@v1
114-
with:
115-
tag: latest
116-
allowUpdates: true
117-
artifacts: "target/debug/alpine_amd64-interactive-rebase-tool"
118-
artifactErrorsFailBuild: true
119-
replacesArtifacts: true
120-
omitBodyDuringUpdate: true
121-
omitDraftDuringUpdate: true
122-
omitNameDuringUpdate: true
123-
makeLatest: false
124-
prerelease: true
125-
updateOnlyUnreleased: true
126-
127-
arch:
128-
name: Arch Latest
129114
runs-on: ubuntu-latest
130-
needs: update-latest-tag
131-
container:
132-
image: 'docker://archlinux:base-devel'
133115
steps:
134-
- uses: actions/checkout@v3
135-
- uses: dtolnay/rust-toolchain@master
136-
with:
116+
- uses: actions/checkout@v4
117+
- name: Cache
118+
uses: Swatinem/rust-cache@v2
119+
- name: Build
120+
uses: houseabsolute/actions-rust-cross@v0
121+
with:
122+
command: build
123+
target: ${{ matrix.platform.target }}
137124
toolchain: nightly
138-
- name: "Build"
139-
run: |
140-
cargo build --features dev
141-
cp target/debug/interactive-rebase-tool target/debug/arch_amd64-interactive-rebase-tool
125+
args: "--features 'dev ${{ matrix.platform.features }}'"
126+
- name: "Copy"
127+
run: cp target/${{ matrix.platform.target }}/debug/interactive-rebase-tool target/debug/git-interactive-rebase-tool-unstable-${{ matrix.platform.name }}
142128
- name: Upload
143129
uses: ncipollo/release-action@v1
144130
with:
145131
tag: latest
146132
allowUpdates: true
147-
artifacts: "target/debug/arch_amd64-interactive-rebase-tool"
133+
artifacts: target/debug/git-interactive-rebase-tool-unstable-${{ matrix.platform.name }}
148134
artifactErrorsFailBuild: true
149135
replacesArtifacts: true
150136
omitBodyDuringUpdate: true
@@ -154,69 +140,16 @@ jobs:
154140
prerelease: true
155141
updateOnlyUnreleased: true
156142

157-
fedora:
158-
name: Fedora Latest
159-
runs-on: ubuntu-latest
160-
needs: update-latest-tag
161-
container:
162-
image: 'docker://fedora:latest'
163-
steps:
164-
- uses: actions/checkout@v3
165-
- run: |
166-
dnf install curl dnf-plugins-core cmake gcc clang make -y
167-
- uses: dtolnay/rust-toolchain@master
168-
with:
169-
toolchain: nightly
170-
- name: "Build"
171-
run: |
172-
cargo build --features dev
173-
cp target/debug/interactive-rebase-tool target/debug/fedora_amd64-interactive-rebase-tool
174-
- name: Upload
175-
uses: ncipollo/release-action@v1
176-
with:
177-
tag: latest
178-
allowUpdates: true
179-
artifacts: "target/debug/fedora_amd64-interactive-rebase-tool"
180-
artifactErrorsFailBuild: true
181-
replacesArtifacts: true
182-
omitBodyDuringUpdate: true
183-
omitDraftDuringUpdate: true
184-
omitNameDuringUpdate: true
185-
makeLatest: false
186-
prerelease: true
187-
updateOnlyUnreleased: true
188-
189-
macos-amd64:
190-
name: MacOS amd64 Latest
191-
runs-on: macos-latest
192-
timeout-minutes: 10
193-
needs: update-latest-tag
194-
steps:
195-
- uses: actions/checkout@v3
196-
- uses: dtolnay/rust-toolchain@nightly
197-
with:
198-
toolchain: nightly
199-
- name: "Build"
200-
run: |
201-
cargo build --features dev
202-
cp target/debug/interactive-rebase-tool target/debug/macos-amd64-interactive-rebase-tool
203-
- name: Upload
204-
uses: ncipollo/release-action@v1
205-
with:
206-
tag: latest
207-
allowUpdates: true
208-
artifacts: "target/debug/macos-amd64-interactive-rebase-tool"
209-
artifactErrorsFailBuild: true
210-
replacesArtifacts: true
211-
omitBodyDuringUpdate: true
212-
omitDraftDuringUpdate: true
213-
omitNameDuringUpdate: true
214-
makeLatest: false
215-
prerelease: true
216-
updateOnlyUnreleased: true
217-
218-
macos-arm:
219-
name: MacOS ARM Latest
143+
macos:
144+
name: "Release Latest - macOS_${{ matrix.platform.name }}"
145+
continue-on-error: true
146+
strategy:
147+
matrix:
148+
platform:
149+
- name: arm
150+
target: aarch64-apple-darwin
151+
- name: intel
152+
target: x86_64-apple-darwin
220153
runs-on: macos-latest
221154
timeout-minutes: 10
222155
needs: update-latest-tag
@@ -225,17 +158,17 @@ jobs:
225158
- uses: dtolnay/rust-toolchain@nightly
226159
with:
227160
toolchain: nightly
228-
targets: aarch64-apple-darwin
161+
targets: ${{ matrix.platform.target }}
229162
- name: "Build"
230163
run: |
231-
cargo build --target aarch64-apple-darwin --features dev
232-
cp target/aarch64-apple-darwin/debug/interactive-rebase-tool target/aarch64-apple-darwin/debug/macos-arm-interactive-rebase-tool
164+
cargo build --features dev --target ${{ matrix.platform.target }}
165+
cp target/${{ matrix.platform.target }}/debug/interactive-rebase-tool target/git-interactive-rebase-tool-unstable-macos_${{ matrix.platform.name }}
233166
- name: Upload
234167
uses: ncipollo/release-action@v1
235168
with:
236169
tag: latest
237170
allowUpdates: true
238-
artifacts: "target/aarch64-apple-darwin/debug/macos-arm-interactive-rebase-tool"
171+
artifacts: target/git-interactive-rebase-tool-unstable-macos_${{ matrix.platform.name }}
239172
artifactErrorsFailBuild: true
240173
replacesArtifacts: true
241174
omitBodyDuringUpdate: true
@@ -246,23 +179,34 @@ jobs:
246179
updateOnlyUnreleased: true
247180

248181
windows:
249-
name: Windows Latest
182+
name: "Release Latest - Windows_${{ matrix.platform.name }}"
183+
continue-on-error: true
184+
strategy:
185+
matrix:
186+
platform:
187+
- name: arm64
188+
target: aarch64-pc-windows-msvc
189+
- name: x64
190+
target: x86_64-pc-windows-msvc
250191
runs-on: windows-latest
251192
timeout-minutes: 10
252193
needs: update-latest-tag
253194
steps:
254195
- uses: actions/checkout@v3
255196
- uses: dtolnay/rust-toolchain@stable
197+
with:
198+
toolchain: stable
199+
targets: ${{ matrix.platform.target }}
256200
- name: "Build"
257201
run: |
258-
cargo rustc --target x86_64-pc-windows-msvc --release --bin interactive-rebase-tool
259-
copy target/x86_64-pc-windows-msvc/release/interactive-rebase-tool.exe target/x86_64-pc-windows-msvc/release/windows_amd64-interactive-rebase-tool.exe
202+
cargo rustc --target ${{ matrix.platform.target }} --release --bin interactive-rebase-tool
203+
copy target/${{ matrix.platform.target }}/release/interactive-rebase-tool.exe target/git-interactive-rebase-tool-unstable-windows_${{ matrix.platform.name }}.exe
260204
- name: Upload
261205
uses: ncipollo/release-action@v1
262206
with:
263207
tag: latest
264208
allowUpdates: true
265-
artifacts: "target/x86_64-pc-windows-msvc/release/windows_amd64-interactive-rebase-tool.exe"
209+
artifacts: "target/git-interactive-rebase-tool-unstable-windows_${{ matrix.platform.name }}.exe"
266210
artifactErrorsFailBuild: true
267211
replacesArtifacts: true
268212
omitBodyDuringUpdate: true

0 commit comments

Comments
 (0)