Skip to content

Commit ee1482f

Browse files
authored
support 'arm64' architecture (#16)
* add `config-args` option * use `$TESTSPACE_CLIENT_VER` to select specific version
1 parent 1d7fb16 commit ee1482f

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ jobs:
1515
matrix:
1616
os: [ubuntu-latest, macos-latest, windows-latest]
1717
steps:
18-
- uses: actions/checkout@v2
19-
with:
20-
fetch-depth: 50
18+
- uses: actions/checkout@v3
2119
- name: Testspace client install & config
2220
uses: ./
2321
with:

action.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,39 @@ inputs:
88
token:
99
description: 'Testspace access token (required for private repos only)'
1010
required: false
11+
config-args:
12+
description: 'Custom "config" arguments'
13+
required: false
1114
branding:
1215
color: green
1316
icon: terminal
1417
runs:
1518
using: 'composite'
1619
steps:
1720
- run: |
18-
if [ `uname -m` != 'x86_64' ]; then echo 'Error: Not supported platform.' && exit 1; fi
21+
base_url=https://testspace-client.s3.amazonaws.com
22+
if [ "$TESTSPACE_CLIENT_VER" ]; then version="-$TESTSPACE_CLIENT_VER"; fi
1923
case `uname -s` in
2024
Linux)
2125
folder=$HOME/bin
2226
mkdir -p $folder
23-
curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | tar -zxvf- -C $RUNNER_TEMP
27+
arch=`uname -m`
28+
if [ "$arch" != "x86_64" ]; then version="-${arch}${version}"; fi
29+
curl -fsSL ${base_url}/testspace-linux${version}.tgz | tar -zxvf- -C $RUNNER_TEMP
2430
cp -f -p -u $RUNNER_TEMP/testspace $folder
2531
;;
2632
Darwin)
2733
folder=$HOME/bin
2834
mkdir -p $folder
29-
curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-darwin.tgz | tar -zxvf- -C $RUNNER_TEMP
35+
curl -fsSL ${base_url}/testspace-darwin${version}.tgz | tar -zxvf- -C $RUNNER_TEMP
3036
rsync -t -u $RUNNER_TEMP/testspace $folder
3137
;;
3238
*) # Windows
3339
folder=$LOCALAPPDATA\Programs\testspace
3440
mkdir -p "$folder"
35-
curl -OsSL https://testspace-client.s3.amazonaws.com/testspace-windows.zip
36-
unzip -q -o testspace-windows.zip -d $RUNNER_TEMP
37-
rm testspace-windows.zip
41+
curl -OsSL ${base_url}/testspace-windows${version}.zip
42+
unzip -q -o testspace-windows${version}.zip -d $RUNNER_TEMP
43+
rm testspace-windows${version}.zip
3844
cp -f -p -u $RUNNER_TEMP/testspace.exe "$folder"
3945
;;
4046
esac
@@ -48,6 +54,7 @@ runs:
4854
if [ "$token" ]; then
4955
echo "::add-mask::${{ inputs.token }}"
5056
if [ "${token%%:*}" == "$token" ]; then token="${token}:"; fi
57+
domain="${token}@${domain}"
5158
fi
52-
testspace config url "${token}@${domain}"
59+
testspace config url "${domain}" ${{ inputs.config-args }}
5360
shell: bash

0 commit comments

Comments
 (0)