Browse Source

Add ARM handling to installation script (#303)

remotes/origin/add-with-shims
Gal Schlezinger 4 years ago committed by GitHub
parent
commit
1bf2f37304
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      .ci/install.sh
  2. 38
      .github/workflows/installation_script.yml

12
.ci/install.sh

@ -41,7 +41,17 @@ parse_args() { @@ -41,7 +41,17 @@ parse_args() {
set_filename() {
if [ "$OS" == "Linux" ]; then
FILENAME="fnm-linux"
# Based on https://stackoverflow.com/a/45125525
case "$(uname -m)" in
arm | armv7*)
FILENAME="fnm-arm32"
;;
aarch* | armv8*)
FILENAME="fnm-arm64"
;;
*)
FILENAME="fnm-linux"
esac
elif [ "$OS" == "Darwin" ] && [ "$FORCE_INSTALL" == "true" ]; then
FILENAME="fnm-macos"
USE_HOMEBREW="false"

38
.github/workflows/installation_script.yml

@ -10,6 +10,44 @@ on: @@ -10,6 +10,44 @@ on:
- .ci/install.sh
jobs:
test_against_latest_release_arm:
strategy:
matrix:
docker_image:
- arm64v8/ubuntu
- arm32v7/ubuntu
name: Test against latest release (ARM)
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1
- uses: actions/checkout@v2
- name: Run installation script in Docker
run: |
docker run --rm -v $(pwd):$(pwd) -e "RUST_LOG=fnm=debug" --workdir $(pwd) ${{matrix.docker_image}} bash -c '
set -e
apt update && apt install -y unzip curl libatomic1
echo "-------------------------------------"
echo "Installing for CPU arch: $(uname -m)"
bash ./.ci/install.sh
echo "fnm --version"
~/.fnm/fnm --version
echo "eval fnm env"
eval "$(~/.fnm/fnm env)"
echo "fnm install"
~/.fnm/fnm install 12
echo "node -v"
~/.fnm/fnm exec --using=12 -- node -v
'
test_against_latest_release:
name: Test against latest release
strategy:

Loading…
Cancel
Save