Skip to content

Add linux arm support for nodegit #74

Add linux arm support for nodegit

Add linux arm support for nodegit #74

Workflow file for this run

on:
push:
branches:
- figma
tags:
- v*.*.*
pull_request:
name: Testing
permissions:
id-token: write
contents: read
jobs:
linux-tests:
name: "Linux Tests"
strategy:
matrix:
node: [18]
arch: [x86, arm64]
runs-on: ubuntu-latest
container: ubuntu:22.04
steps:
- name: Install Dependencies for Ubuntu
# git >= 2.18 required for actions/checkout git support
run: apt update && apt install -y software-properties-common && add-apt-repository -y ppa:git-core/ppa && apt update && apt install -y git build-essential clang python3 libssl-dev libkrb5-dev libc++-dev
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
- name: Setup Environment
run: |
mkdir ~/.ssh_tests
chmod 700 ~/.ssh_tests
printf "%b" "Host *\n\tStrictHostKeyChecking no\n" > ~/.ssh_tests/config
printf "%b" "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDBkHMoNRRkHYNE7EnQLdFxMgVcqGgNPYDhrWiLMlYuzpmEcUnhwW3zNaIa4J2JlGkRNgYZVia1Ic1V3koJPE3YO2+exAfJBIPeb6O1qDADc2hFFHzd28wmHKUkO61yzo2ZjDQfaEVtjN39Yiy19AbddN3bzNrgvuQT574fa6Rghl2RfecKYO77iHA1RGXIFc8heXVIUuUV/jHjb56WqoHH8vyt1DqUz89oyiHq8Cku0qzKN80COheZPseA1EvT0zlIgbXBxwijN4xRmvInK0fB5Kc9r3kddH2tT7V09bOFJsvGQaQmQ1WFTCqjpBFw1CHKcbfPLOxbLpVIR9gyx03R\n" > ~/.ssh_tests/id_rsa.pub
printf "%b" "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEAwZBzKDUUZB2DROxJ0C3RcTIFXKhoDT2A4a1oizJWLs6ZhHFJ\n4cFt8zWiGuCdiZRpETYGGVYmtSHNVd5KCTxN2DtvnsQHyQSD3m+jtagwA3NoRRR8\n3dvMJhylJDutcs6NmYw0H2hFbYzd/WIstfQG3XTd28za4L7kE+e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ml1\n18u+uo9RJPhPDBd7Gj7r8QKBgFraxWy7t24xkZMDgK4fiM/3tQhFvhz/CY2wPbxG\n5Ae8UfkmLcOCUfTIReqfd9fAnsAFZNIKa5izHRu/wsh9NwYIJSlvm8PsEVtTrPRy\nfgvWet+i24/2eYZGsag8b19gaLCNKQzXDT1czYg8RNVsRSX427BoLzXeXNkW9uNu\nFbI9AoGAV2kxcdcKS4BtNHKPeGgV87dM0DWhQaAtEXEIcQquFtba0lAXioGHg8U4\nzeiugl4Qzchwk5qd3wnZ4SOhx0s16/5gQDlnkbjFR6EREUnvLRwV92zBXUTOGIkh\nZ7Z4rcgUKlVAaHT3OHN/lTyqJG/ib+K4wZhbztl/ox+JUFsvD98=\n-----END RSA PRIVATE KEY-----\n" > ~/.ssh_tests/id_rsa
chmod 600 ~/.ssh_tests/id_rsa*
git config --global user.name "John Doe"
git config --global user.email [email protected]
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
with:
node-version: ${{ matrix.node }}
check-latest: true
- name: Install
env:
CC: clang
CXX: clang++
npm_config_clang: 1
GYP_DEFINES: use_obsolete_asm=true
# There is a race condition in node/generate that needs to be fixed
run: |
chown root .
npm set unsafe-perm true || true
node utils/retry npm install
- name: Test
run: |
set -e
eval `ssh-agent -s`
ssh-add ~/.ssh_tests/id_rsa
node utils/retry npm test
- name: configure aws credentials
if: startsWith(github.ref, 'refs/tags/v')
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::060562746757:role/nodegit-repository
aws-region: us-west-2
- name: Deploy
if: startsWith(github.ref, 'refs/tags/v')
run: |
npm install -g node-pre-gyp aws-sdk
node lifecycleScripts/clean
node-pre-gyp package
node-pre-gyp publish
macos-tests:
name: "macOS Tests"
strategy:
matrix:
node: [18]
runs-on: macos-latest
# This is mostly the same as the Linux steps, waiting for anchor support
# https://github.com/actions/runner/issues/1182
steps:
- name: Setup Environment
run: |
mkdir ~/.ssh_tests
chmod 700 ~/.ssh_tests
printf "%b" "Host *\n\tStrictHostKeyChecking no\n" > ~/.ssh_tests/config
printf "%b" "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDBkHMoNRRkHYNE7EnQLdFxMgVcqGgNPYDhrWiLMlYuzpmEcUnhwW3zNaIa4J2JlGkRNgYZVia1Ic1V3koJPE3YO2+exAfJBIPeb6O1qDADc2hFFHzd28wmHKUkO61yzo2ZjDQfaEVtjN39Yiy19AbddN3bzNrgvuQT574fa6Rghl2RfecKYO77iHA1RGXIFc8heXVIUuUV/jHjb56WqoHH8vyt1DqUz89oyiHq8Cku0qzKN80COheZPseA1EvT0zlIgbXBxwijN4xRmvInK0fB5Kc9r3kddH2tT7V09bOFJsvGQaQmQ1WFTCqjpBFw1CHKcbfPLOxbLpVIR9gyx03R\n" > ~/.ssh_tests/id_rsa.pub
printf "%b" "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEAwZBzKDUUZB2DROxJ0C3RcTIFXKhoDT2A4a1oizJWLs6ZhHFJ\n4cFt8zWiGuCdiZRpETYGGVYmtSHNVd5KCTxN2DtvnsQHyQSD3m+jtagwA3NoRRR8\n3dvMJhylJDutcs6NmYw0H2hFbYzd/WIstfQG3XTd28za4L7kE+e+H2ukYIZdkX3n\nCmDu+4hwNURlyBXPIXl1SFLlFf4x42+elqqBx/L8rdQ6lM/PaMoh6vApLtKsyjfN\nAjoXmT7HgNRL09M5SIG1wccIozeMUZryJytHweSnPa95HXR9rU+1dPWzhSbLxkGk\nJkNVhUwqo6QRcNQhynG3zyzsWy6VSEfYMsdN0QIDAQABAoIBABsZNPYBEFy/wPvq\nNJ8/et3lCdkh/oc0ABIYK9Wo82XUKKvhDF3drZ3p+UrX/VYgf+EX9hyf8gVTuSJ3\nX1gRqDhIgeTxPsHGrwt6B6pL5ITnKEbbimuo9Ni1E+2RqUO0ZSCE/1sSRv4CRaXO\nk8HZawif7ttxv4bNUrLys6xEbpv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ox+JUFsvD98=\n-----END RSA PRIVATE KEY-----\n" > ~/.ssh_tests/id_rsa
chmod 600 ~/.ssh_tests/id_rsa*
git config --global user.name "John Doe"
git config --global user.email [email protected]
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
with:
node-version: ${{ matrix.node }}
check-latest: true
- name: Install
env:
CC: clang
CXX: clang++
npm_config_clang: 1
GYP_DEFINES: use_obsolete_asm=true
# There is a race condition in node/generate that needs to be fixed
run: node utils/retry npm install
- name: Test
run: |
set -e
eval `ssh-agent -s`
ssh-add ~/.ssh_tests/id_rsa
node utils/retry npm test
- name: configure aws credentials
if: startsWith(github.ref, 'refs/tags/v')
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::060562746757:role/nodegit-repository
aws-region: us-west-2
- name: Deploy
if: startsWith(github.ref, 'refs/tags/v')
run: |
npm install -g node-pre-gyp aws-sdk
node lifecycleScripts/clean
node-pre-gyp package
node-pre-gyp publish