Skip to content

Commit cbb1211

Browse files
authored
Apple m1 support (#33)
Initial M1 support added to the pipelines and install script
1 parent 436bfe4 commit cbb1211

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/workflows/deploy.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ jobs:
2424
os: macOS-latest
2525
name: lightmon-x86_64-apple-darwin.tar.gz
2626

27+
- target: aarch64-apple-darwin
28+
os: macOS-latest
29+
name: lightmon-aarch64-apple-darwin.tar.gz
30+
2731
- target: x86_64-pc-windows-msvc
2832
os: windows-latest
2933
name: lightmon-x86_64-pc-windows-msvc.zip

install.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ MAGENTA="$(tput setaf 5 2>/dev/null || printf '')"
1515
NO_COLOR="$(tput sgr0 2>/dev/null || printf '')"
1616

1717
SUPPORTED_TARGETS="x86_64-unknown-linux-gnu i686-unknown-linux-musl \
18-
x86_64-apple-darwin x86_64-pc-windows-msvc \
19-
i686-pc-wndows-msvc"
18+
aarch64-apple-darwin x86_64-apple-darwin \
19+
x86_64-pc-windows-msvc i686-pc-wndows-msvc"
2020

2121
info() {
2222
printf '%s\n' "${BOLD}${GREY}>${NO_COLOR} $*"
@@ -111,11 +111,14 @@ detect_arch() {
111111

112112
case "${arch}" in
113113
amd64) arch="x86_64" ;;
114+
arm64) arch="aarch64" ;;
114115
esac
115116

116117
# `uname -m` in some cases mis-reports 32bit OS as 64bit, so double check
117118
if [ "${arch}" = "x86_64" ] && [ "$(getconf LONG_BIT)" -eq 32 ]; then
118119
arch=i686
120+
elif [ "${arch}" = "aarch64" ] && [ "$(getconf LONG_BIT)" -eq 32 ]; then
121+
arch=arm
119122
fi
120123

121124
printf '%s' "${arch}"
@@ -263,7 +266,7 @@ is_build_available() {
263266
)
264267

265268
if [ "${good}" != "1" ]; then
266-
error "${arch} builds for ${platform} are not yet availble for Lightmon"
269+
error "${arch} builds for ${platform} are not yet available for Lightmon"
267270
printf "\n" >&2
268271
info "If you would like to see a build for your configuration,"
269272
info "please create an issue requesting a build for ${MAGENTA}${target}$-${NO_COLOR}:"

0 commit comments

Comments
 (0)