Skip to content

Commit 19b1125

Browse files
authored
Release build for linux arm64 (#100)
1 parent 8728d59 commit 19b1125

File tree

6 files changed

+50
-23
lines changed

6 files changed

+50
-23
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111

1212
jobs:
1313
checks:
14-
runs-on: ubuntu-latest
14+
runs-on: ubuntu-22.04
1515

1616
steps:
1717
- uses: actions/checkout@v2
@@ -33,7 +33,7 @@ jobs:
3333
timeout-minutes: 20
3434
strategy:
3535
matrix:
36-
os: [windows-latest, ubuntu-latest]
36+
os: [windows-latest, ubuntu-22.04]
3737
rust_version: [stable, "1.66.0"]
3838

3939
runs-on: ${{ matrix.os }}
@@ -50,7 +50,7 @@ jobs:
5050
run: cargo test --locked --verbose
5151

5252
end-to-end-tests-ubuntu:
53-
runs-on: ubuntu-latest
53+
runs-on: ubuntu-22.04
5454
needs: build
5555
steps:
5656
- uses: actions/checkout@v2
@@ -82,7 +82,7 @@ jobs:
8282
./scripts/end-to-end-tests.sh
8383
8484
kill-process-test-unix:
85-
runs-on: ubuntu-latest
85+
runs-on: ubuntu-22.04
8686
needs: build
8787
steps:
8888
- uses: actions/checkout@v2

.github/workflows/release.yml

Lines changed: 40 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
run: cargo build --verbose --locked --release
2020

2121
- name: Upload artifacts
22-
uses: actions/upload-artifact@v1
22+
uses: actions/upload-artifact@v4
2323
with:
2424
name: foreman-win64
2525
path: target/release/foreman.exe
@@ -43,7 +43,7 @@ jobs:
4343
cargo build --verbose --locked --release --target x86_64-apple-darwin
4444
4545
- name: Upload Intel (x86_64) artifacts
46-
uses: actions/upload-artifact@v1
46+
uses: actions/upload-artifact@v4
4747
with:
4848
name: foreman-macos-x86_64
4949
path: target/x86_64-apple-darwin/release/foreman
@@ -74,13 +74,13 @@ jobs:
7474
cargo build --verbose --locked --release --target aarch64-apple-darwin
7575
7676
- name: Upload arm64 artifacts
77-
uses: actions/upload-artifact@v1
77+
uses: actions/upload-artifact@v4
7878
with:
7979
name: foreman-macos-arm64
8080
path: target/aarch64-apple-darwin/release/foreman
8181

82-
linux:
83-
runs-on: ubuntu-latest
82+
linux-x86_64:
83+
runs-on: ubuntu-22.04
8484
timeout-minutes: 15
8585

8686
steps:
@@ -90,26 +90,43 @@ jobs:
9090
run: cargo build --locked --verbose --release
9191

9292
- name: Upload artifacts
93-
uses: actions/upload-artifact@v1
93+
uses: actions/upload-artifact@v4
9494
with:
95-
name: foreman-linux
95+
name: foreman-linux-x86_64
96+
path: target/release/foreman
97+
98+
linux-arm64:
99+
runs-on: ubuntu-22.04-arm
100+
timeout-minutes: 15
101+
102+
steps:
103+
- uses: actions/checkout@v1
104+
105+
- name: Build arm64 release binary
106+
run: cargo build --locked --verbose --release
107+
108+
- name: Upload arm64 artifacts
109+
uses: actions/upload-artifact@v4
110+
with:
111+
name: foreman-linux-arm64
96112
path: target/release/foreman
97113

98114
release:
99-
runs-on: ubuntu-latest
115+
runs-on: ubuntu-22.04
100116
timeout-minutes: 15
101-
needs: ["windows", "macos-x86-64", "macos-arm64", "linux"]
117+
needs: ["windows", "macos-x86-64", "macos-arm64", "linux-x86_64", "linux-arm64"]
102118
steps:
103119
- uses: actions/checkout@v1
104120
- name: Download artifacts
105-
uses: actions/download-artifact@v2
121+
uses: actions/download-artifact@v4
106122
with:
107123
path: artifacts
108124
- run: |
109125
zip -rj foreman-win64.zip ./artifacts/foreman-win64/*
110126
zip -rj foreman-macos-x86_64.zip ./artifacts/foreman-macos-x86_64/*
111127
zip -rj foreman-macos-arm64.zip ./artifacts/foreman-macos-arm64/*
112-
zip -rj foreman-linux.zip ./artifacts/foreman-linux/*
128+
zip -rj foreman-linux-x86_64.zip ./artifacts/foreman-linux-x86_64/*
129+
zip -rj foreman-linux-arm64.zip ./artifacts/foreman-linux-arm64/*
113130
- name: Create release
114131
id: create_release
115132
uses: actions/create-release@v1
@@ -156,6 +173,16 @@ jobs:
156173
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
157174
with:
158175
upload_url: ${{ steps.create_release.outputs.upload_url }}
159-
asset_path: ./foreman-linux.zip
160-
asset_name: foreman-linux.zip
176+
asset_path: ./foreman-linux-x86_64.zip
177+
asset_name: foreman-linux-x86_64.zip
178+
asset_content_type: application/zip
179+
180+
- name: Upload linux build (arm64)
181+
uses: actions/upload-release-asset@v1
182+
env:
183+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
184+
with:
185+
upload_url: ${{ steps.create_release.outputs.upload_url }}
186+
asset_path: ./foreman-linux-arm64.zip
187+
asset_name: foreman-linux-arm64.zip
161188
asset_content_type: application/zip

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ default-members = [".", "artiaa_auth"]
66
[package]
77
name = "foreman"
88
description = "Toolchain manager for simple binary tools"
9-
version = "1.6.3"
9+
version = "1.6.4"
1010
authors = [
1111
"Lucien Greathouse <[email protected]>",
1212
"Matt Hargett <[email protected]>",

tests/snapshots/help_command.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ source: tests/cli.rs
33
assertion_line: 100
44
expression: content
55
---
6-
foreman 1.6.3
6+
foreman 1.6.4
77

88
USAGE:
99
foreman [FLAGS] <SUBCOMMAND>

tests/snapshots/install_all_tools_before_failing.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@ expression: content
88
Request from `https://api.github.com/repos/Roblox/NotARepository/releases`
99

1010
Received body:
11-
{"message":"Not Found","documentation_url":"https://docs.github.com/rest/releases/releases#list-releases"}
11+
{"message":"Not Found","documentation_url":"https://docs.github.com/rest/releases/releases#list-releases","status":"404"}
1212
[INFO ] Downloading github.com/Roblox/@^0.2.0
1313
[ERROR] The following error occurred while trying to download tool "badly-formatted-tool":
1414
unexpected response body: invalid type: map, expected a sequence at line 1 column 0
1515
Request from `https://api.github.com/repos/Roblox//releases`
1616

1717
Received body:
18-
{"message":"Not Found","documentation_url":"https://docs.github.com/rest"}
18+
{"message":"Not Found","documentation_url":"https://docs.github.com/rest","status":"404"}
1919
[INFO ] Downloading github.com/Roblox/VeryFakeRepository@^0.1.0
2020
[ERROR] The following error occurred while trying to download tool "not-a-real-tool":
2121
unexpected response body: invalid type: map, expected a sequence at line 1 column 0
2222
Request from `https://api.github.com/repos/Roblox/VeryFakeRepository/releases`
2323

2424
Received body:
25-
{"message":"Not Found","documentation_url":"https://docs.github.com/rest/releases/releases#list-releases"}
25+
{"message":"Not Found","documentation_url":"https://docs.github.com/rest/releases/releases#list-releases","status":"404"}
2626
The following tools were not installed:
2727
[
2828
"also-not-a-real-tool",

0 commit comments

Comments
 (0)