Skip to content

Commit 6419680

Browse files
feat(CI): adds Big Sur to all CI jobs
1 parent fe059a7 commit 6419680

File tree

5 files changed

+64
-11
lines changed

5 files changed

+64
-11
lines changed

.github/workflows/release.yml

+34-3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ env:
1111
GITHUB_REF: "${{ github.ref }}"
1212
WINDOWS_TARGET: x86_64-pc-windows-msvc
1313
MACOS_TARGET: x86_64-apple-darwin
14+
MACOS_BIG_SUR_TARGET: aarch64-apple-darwin
1415
LINUX_TARGET: x86_64-unknown-linux-musl
1516

1617
# Space separated paths to include in the archive.
@@ -22,14 +23,23 @@ jobs:
2223
runs-on: ${{ matrix.os }}
2324
strategy:
2425
matrix:
25-
build: [linux, macos, windows]
26+
build:
27+
[
28+
linux,
29+
macos,
30+
macos-big-sur,
31+
windows
32+
]
2633
include:
2734
- build: linux
2835
os: ubuntu-latest
2936
rust: stable
3037
- build: macos
3138
os: macos-latest
3239
rust: stable
40+
- build: macos-big-sur
41+
os: macos-11.0
42+
rust: stable
3343
- build: windows
3444
os: windows-latest
3545
rust: stable
@@ -134,6 +144,13 @@ jobs:
134144
mv ${{ env.RELEASE_ADDS }} ./dist
135145
7z a -ttar -so -an ./dist | 7z a -si ./${{ env.RELEASE_DIR }}/${{ env.RELEASE_BIN }}-${{ steps.get_version.outputs.VERSION }}-${{ env.MACOS_TARGET }}.tar.gz
136146
147+
- name: Create tarball (MacOS Big Sur)
148+
if: matrix.build == 'macos-big-sur'
149+
run: |
150+
mv ./target/release/${{ env.RELEASE_BIN }} ./dist/${{ env.RELEASE_BIN }}
151+
mv ${{ env.RELEASE_ADDS }} ./dist
152+
7z a -ttar -so -an ./dist | 7z a -si ./${{ env.RELEASE_DIR }}/${{ env.RELEASE_BIN }}-${{ steps.get_version.outputs.VERSION }}-${{ env.MACOS_BIG_SUR_TARGET }}.tar.gz
153+
137154
- name: Upload Zip
138155
uses: actions/upload-artifact@v1
139156
with:
@@ -161,6 +178,8 @@ jobs:
161178
tar -xzvf ./linux/${{ env.RELEASE_BIN }}-${{ steps.get_version.outputs.VERSION }}-${{ env.LINUX_TARGET }}.tar.gz && mv ./dist/${{ env.RELEASE_BIN }} ./linux-cli && rm -rf dist
162179
tar -xzvf ./windows/${{ env.RELEASE_BIN }}-${{ steps.get_version.outputs.VERSION }}-${{ env.WINDOWS_TARGET }}.tar.gz && mv ./dist/${{ env.RELEASE_BIN }}.exe ./windows-cli.exe && rm -rf dist
163180
tar -xzvf ./macos/${{ env.RELEASE_BIN }}-${{ steps.get_version.outputs.VERSION }}-${{ env.MACOS_TARGET }}.tar.gz && mv ./dist/${{ env.RELEASE_BIN }} ./macos-cli && rm -rf dist
181+
tar -xzvf ./macos-big-sur/${{ env.RELEASE_BIN }}-${{ steps.get_version.outputs.VERSION }}-${{ env.MACOS_BIG_SUR_TARGET }}.tar.gz && mv ./dist/${{ env.RELEASE_BIN }} ./macos-big-sur-cli && rm -rf dist
182+
164183
165184
- name: Hash binaries
166185
id: get_shas
@@ -169,6 +188,7 @@ jobs:
169188
echo ::set-output name=linux::"- __Linux__: $(sha256sum -b linux-cli | cut -d ' ' -f1)"
170189
echo ::set-output name=windows::"- __Windows__: $(sha256sum -b windows-cli.exe | cut -d ' ' -f1)"
171190
echo ::set-output name=macos::"- __MacOS__: $(sha256sum -b macos-cli | cut -d ' ' -f1)"
191+
echo ::set-output name=macos-big-sur::"- __MacOS_Big_Sur__: $(sha256sum -b macos-big-sur-cli | cut -d ' ' -f1)"
172192
173193
- name: Create Release
174194
id: create_release
@@ -187,7 +207,8 @@ jobs:
187207
### SHA256 of release binaries for validation:
188208
${{ steps.get_shas.outputs.LINUX }}
189209
${{ steps.get_shas.outputs.WINDOWS }}
190-
${{ steps.get_shas.outputs.MACOS }}
210+
${{ steps.get_shas.outputs.MACOS }}
211+
${{ steps.get_shas.outputs.MACOS_BIG_SUR }}
191212
192213
- name: Release Linux tarball
193214
uses: actions/upload-release-asset@v1
@@ -217,4 +238,14 @@ jobs:
217238
upload_url: ${{ steps.create_release.outputs.upload_url }}
218239
asset_path: ./macos/rover-${{ steps.get_version.outputs.VERSION }}-${{ env.MACOS_TARGET }}.tar.gz
219240
asset_content_type: application/gzip
220-
asset_name: rover-${{ steps.get_version.outputs.VERSION }}-${{ env.MACOS_TARGET }}.tar.gz
241+
asset_name: rover-${{ steps.get_version.outputs.VERSION }}-${{ env.MACOS_TARGET }}.tar.gz
242+
243+
- name: Release MacOS Big Sur tarball
244+
uses: actions/upload-release-asset@v1
245+
env:
246+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
247+
with:
248+
upload_url: ${{ steps.create_release.outputs.upload_url }}
249+
asset_path: ./macos-big-sur/rover-${{ steps.get_version.outputs.VERSION }}-${{ env.MACOS_BIG_SUR_TARGET }}.tar.gz
250+
asset_content_type: application/gzip
251+
asset_name: rover-${{ steps.get_version.outputs.VERSION }}-${{ env.MACOS_BIG_SUR_TARGET }}.tar.gz

.github/workflows/test-nightly.yml

+4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
[
1414
linux-nightly,
1515
macos-nightly,
16+
macos-big-sur-nightly,
1617
windows-nightly,
1718
]
1819
include:
@@ -22,6 +23,9 @@ jobs:
2223
- build: macos-nightly
2324
os: macos-latest
2425
rust: nightly
26+
- build: macos-big-sur-nightly
27+
os: macos-11.0
28+
rust: nightly
2529
- build: windows-nightly
2630
os: windows-latest
2731
rust: nightly

.github/workflows/test.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,23 @@ jobs:
99
runs-on: ${{ matrix.os }}
1010
strategy:
1111
matrix:
12-
build: [linux-stable, macos-stable, windows-stable]
12+
build:
13+
[
14+
linux-stable,
15+
macos-stable,
16+
macos-big-sur,
17+
windows-stable
18+
]
1319
include:
1420
- build: linux-stable
1521
os: ubuntu-latest
1622
rust: stable
1723
- build: macos-stable
1824
os: macos-latest
1925
rust: stable
26+
- build: macos-big-sur
27+
os: macos-11.0
28+
rust: stable
2029
- build: windows-stable
2130
os: windows-latest
2231
rust: stable

installers/binstall/scripts/nix/install.sh

+10-7
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
set -u
1313

14-
BINARY_DOWNLOAD_PREFIX="https://github.com/apollographql/rover/releases/download/$VERSION"
14+
BINARY_DOWNLOAD_PREFIX="https://github.com/EverlastingBugstopper/rover/releases/download/$VERSION"
1515

1616
download_binary_and_run_installer() {
1717
downloader --check
@@ -43,7 +43,7 @@ download_binary_and_run_installer() {
4343
local _file="$_dir/input.tar.gz"
4444
local _rover="$_dir/rover$_ext"
4545

46-
say "downloading rover" 1>&2
46+
say "downloading rover from $_url" 1>&2
4747

4848
ensure mkdir -p "$_dir"
4949
downloader "$_url" "$_file"
@@ -82,7 +82,11 @@ get_architecture() {
8282
if [ "$_ostype" = Darwin -a "$_cputype" = i386 ]; then
8383
# Darwin `uname -s` lies
8484
if sysctl hw.optional.x86_64 | grep -q ': 1'; then
85-
local _cputype=x86_64
85+
local _cputype=aarch-64
86+
fi
87+
88+
if sysctl hw.optional.arm64 | grep -q ': 1'; then
89+
local _cputype=aarch-64
8690
fi
8791
fi
8892

@@ -105,8 +109,7 @@ get_architecture() {
105109
esac
106110

107111
case "$_cputype" in
108-
x86_64 | x86-64 | x64 | amd64)
109-
local _cputype=x86_64
112+
x86_64 | x86-64 | x64 | amd64 | aarch-64)
110113
;;
111114
*)
112115
err "no precompiled binaries available for CPU architecture: $_cputype"
@@ -122,13 +125,13 @@ get_architecture() {
122125
say() {
123126
local green=`tput setaf 2`
124127
local reset=`tput sgr0`
125-
echo " ${green}INFO${reset} sh::wrapper: $1"
128+
echo "$1"
126129
}
127130

128131
err() {
129132
local red=`tput setaf 1`
130133
local reset=`tput sgr0`
131-
say " ${red}ERROR${reset} sh::wrapper: $1" >&2
134+
say "${red}ERROR${reset}: $1" >&2
132135
exit 1
133136
}
134137

installers/npm/binary.js

+6
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ const supportedPlatforms = [
3030
RUST_TARGET: "x86_64-apple-darwin",
3131
BINARY_NAME: name,
3232
},
33+
{
34+
TYPE: "Darwin",
35+
ARCHITECTURE: "arm64",
36+
RUST_TARGET: "aarch64-apple-darwin",
37+
BINARY_NAME: name
38+
}
3339
];
3440

3541
const getPlatform = () => {

0 commit comments

Comments
 (0)