Skip to content

Commit 637fed0

Browse files
authored
bt.exe for Windows aarch64
`bt.exe` now has an aarch64 version. Cross compilation of the ring crate to Windows aarch64 fails, so the compilation of the ARM64 bt.exe runs on Windows server ARM64. Compilation of the auto-updater on Windows server ARM64 fails, so is has been removed (this settings is global and can'tr be turned off just for one architecture). `bt self update` exists anyway so it's not an issue.
1 parent 3c4a33f commit 637fed0

3 files changed

Lines changed: 25 additions & 34 deletions

File tree

.github/workflows/release-canary.yml

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ jobs:
113113
env:
114114
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
115115
BUILD_MANIFEST_NAME: target/distrib/${{ join(matrix.targets, '-') }}-dist-manifest.json
116-
HAS_SSLDOTCOM_SIGNING: ${{ secrets.SSLDOTCOM_USERNAME != '' && secrets.SSLDOTCOM_PASSWORD != '' && secrets.SSLDOTCOM_CREDENTIAL_ID != '' && secrets.SSLDOTCOM_TOTP_SECRET != '' }}
117116
steps:
118117
- name: Enable windows longpaths
119118
run: git config --global core.longpaths true
@@ -140,6 +139,14 @@ jobs:
140139
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
141140
fi
142141
142+
- name: Install sha256sum (macOS ARM64)
143+
if: ${{ runner.os == 'macOS' && runner.arch == 'ARM64' }}
144+
shell: bash
145+
run: |
146+
printf '#!/bin/sh\nexec shasum -a 256 "$@"\n' > /tmp/sha256sum
147+
chmod +x /tmp/sha256sum
148+
echo /tmp >> "$GITHUB_PATH"
149+
143150
- name: Install dist
144151
run: ${{ matrix.install_dist.run }}
145152

@@ -153,31 +160,6 @@ jobs:
153160
- name: Install dependencies
154161
run: ${{ matrix.packages_install }}
155162

156-
- name: Configure SSL.com signing env
157-
if: ${{ runner.os == 'Windows' && env.HAS_SSLDOTCOM_SIGNING == 'true' }}
158-
shell: bash
159-
env:
160-
SSLDOTCOM_USERNAME: ${{ secrets.SSLDOTCOM_USERNAME }}
161-
SSLDOTCOM_PASSWORD: ${{ secrets.SSLDOTCOM_PASSWORD }}
162-
SSLDOTCOM_CREDENTIAL_ID: ${{ secrets.SSLDOTCOM_CREDENTIAL_ID }}
163-
SSLDOTCOM_TOTP_SECRET: ${{ secrets.SSLDOTCOM_TOTP_SECRET }}
164-
run: |
165-
write_github_env() {
166-
local key="$1"
167-
local value="$2"
168-
local delimiter="EOF_${key}_$$"
169-
{
170-
echo "${key}<<${delimiter}"
171-
echo "${value}"
172-
echo "${delimiter}"
173-
} >> "$GITHUB_ENV"
174-
}
175-
176-
write_github_env "SSLDOTCOM_USERNAME" "$SSLDOTCOM_USERNAME"
177-
write_github_env "SSLDOTCOM_PASSWORD" "$SSLDOTCOM_PASSWORD"
178-
write_github_env "SSLDOTCOM_CREDENTIAL_ID" "$SSLDOTCOM_CREDENTIAL_ID"
179-
write_github_env "SSLDOTCOM_TOTP_SECRET" "$SSLDOTCOM_TOTP_SECRET"
180-
181163
- name: Build artifacts
182164
shell: bash
183165
run: |

.github/workflows/release.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,14 @@ jobs:
125125
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
126126
fi
127127
128+
- name: Install sha256sum (macOS ARM64)
129+
if: ${{ runner.os == 'macOS' && runner.arch == 'ARM64' }}
130+
shell: bash
131+
run: |
132+
printf '#!/bin/sh\nexec shasum -a 256 "$@"\n' > /tmp/sha256sum
133+
chmod +x /tmp/sha256sum
134+
echo /tmp >> "$GITHUB_PATH"
135+
128136
- name: Install dist
129137
run: ${{ matrix.install_dist.run }}
130138

@@ -139,7 +147,7 @@ jobs:
139147
run: ${{ matrix.packages_install }}
140148

141149
- name: Configure SSL.com signing env
142-
if: ${{ runner.os == 'Windows' && env.HAS_SSLDOTCOM_SIGNING == 'true' }}
150+
if: ${{ runner.os == 'Windows' && env.HAS_SSLDOTCOM_SIGNING == 'true' && !fromJson(needs.plan.outputs.val).announcement_is_prerelease }}
143151
shell: bash
144152
env:
145153
SSLDOTCOM_USERNAME: ${{ secrets.SSLDOTCOM_USERNAME }}

dist-workspace.toml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ members = ["cargo:."]
33

44
# Config for 'dist'
55
[dist]
6+
# Skip checking whether the specified configuration files are up to date
7+
allow-dirty = ["ci"]
68
# The preferred dist version to use in CI (Cargo.toml SemVer syntax)
79
cargo-dist-version = "0.31.0"
810
# CI backends to support
@@ -11,21 +13,20 @@ ci = "github"
1113
create-release = true
1214
# Which actions to run on pull requests
1315
pr-run-mode = "plan"
14-
# Skip checking whether the specified configuration files are up to date
15-
allow-dirty = ["ci"]
1616
ssldotcom-windows-sign = "test"
1717
# The installers to generate for each app
1818
installers = ["shell", "powershell", "homebrew"]
1919
homepage = "https://github.com/braintrustdata/bt"
2020
# Target platforms to build apps for (Rust target-triple syntax)
21-
targets = ["aarch64-apple-darwin", "aarch64-unknown-linux-gnu", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-unknown-linux-musl", "x86_64-pc-windows-msvc"]
21+
targets = ["aarch64-apple-darwin", "aarch64-unknown-linux-gnu", "aarch64-pc-windows-msvc", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-unknown-linux-musl", "x86_64-pc-windows-msvc"]
22+
# Path that installers should place binaries in
23+
install-path = ["$XDG_BIN_HOME/", "$XDG_DATA_HOME/../bin", "~/.local/bin"]
2224
# The archive format to use for non-windows builds (defaults .tar.xz)
2325
unix-archive = ".tar.gz"
2426
# The archive format to use for windows builds (defaults .zip)
2527
windows-archive = ".zip"
26-
# Path that installers should place binaries in
27-
install-path = ["$XDG_BIN_HOME/", "$XDG_DATA_HOME/../bin", "~/.local/bin"]
28-
# Whether to install an updater program
29-
install-updater = true
3028
# Custom message to display on successful install
3129
install-success-msg = ""
30+
31+
[dist.github-custom-runners]
32+
aarch64-pc-windows-msvc = "windows-11-arm"

0 commit comments

Comments
 (0)