ci: fix arm build
This commit is contained in:
parent
cbb71a9a51
commit
68f767b96d
3 changed files with 20 additions and 24 deletions
21
.github/workflows/linux-aarch64.yaml
vendored
21
.github/workflows/linux-aarch64.yaml
vendored
|
@ -2,7 +2,7 @@ name: Linux-aarch64
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DEBUG: 'napi:*'
|
DEBUG: 'napi:*'
|
||||||
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: 'aarch64-linux-gnu-gcc-9'
|
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: 'aarch64-linux-gnu-gcc'
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@ -13,7 +13,7 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: stable - aarch64-unknown-linux-gnu - node@14
|
name: stable - aarch64-unknown-linux-gnu - node@14
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
- run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||||
|
@ -60,7 +60,9 @@ jobs:
|
||||||
key: npm-cache-linux-aarch64-gnu-node@14-${{ hashFiles('yarn.lock') }}
|
key: npm-cache-linux-aarch64-gnu-node@14-${{ hashFiles('yarn.lock') }}
|
||||||
|
|
||||||
- name: Install cross compile toolchain
|
- name: Install cross compile toolchain
|
||||||
run: sudo apt-get install gcc-9-aarch64-linux-gnu g++-9-aarch64-linux-gnu -y
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu -y
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: yarn install --frozen-lockfile --ignore-platform --registry https://registry.npmjs.org --network-timeout 300000
|
run: yarn install --frozen-lockfile --ignore-platform --registry https://registry.npmjs.org --network-timeout 300000
|
||||||
|
@ -72,13 +74,8 @@ jobs:
|
||||||
run: yarn build:test:aarch64
|
run: yarn build:test:aarch64
|
||||||
|
|
||||||
- name: Setup and run tests
|
- name: Setup and run tests
|
||||||
uses: docker://multiarch/ubuntu-core:arm64-focal
|
uses: addnab/docker-run-action@v3
|
||||||
with:
|
with:
|
||||||
args: >
|
image: ghcr.io/napi-rs/napi-rs/nodejs:aarch64-14
|
||||||
sh -c "
|
options: -v ${{ github.workspace }}:/build -w /build
|
||||||
apt-get update && \
|
run: yarn test
|
||||||
apt-get install -y ca-certificates gnupg2 curl && \
|
|
||||||
curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
|
|
||||||
apt-get install -y nodejs && \
|
|
||||||
npm test
|
|
||||||
"
|
|
||||||
|
|
21
.github/workflows/linux-armv7.yaml
vendored
21
.github/workflows/linux-armv7.yaml
vendored
|
@ -2,7 +2,7 @@ name: Linux-armv7
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DEBUG: 'napi:*'
|
DEBUG: 'napi:*'
|
||||||
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER: 'arm-linux-gnueabihf-gcc-9'
|
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER: 'arm-linux-gnueabihf-gcc'
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@ -13,7 +13,7 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: stable - armv7-unknown-linux-gnu - node@14
|
name: stable - armv7-unknown-linux-gnu - node@14
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
- run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||||
|
@ -60,7 +60,9 @@ jobs:
|
||||||
key: npm-cache-linux-armv7-gnu-node@14-${{ hashFiles('yarn.lock') }}
|
key: npm-cache-linux-armv7-gnu-node@14-${{ hashFiles('yarn.lock') }}
|
||||||
|
|
||||||
- name: Install cross compile toolchain
|
- name: Install cross compile toolchain
|
||||||
run: sudo apt-get install gcc-9-arm-linux-gnueabihf -y
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install gcc-arm-linux-gnueabihf -y
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: yarn install --frozen-lockfile --ignore-platform --registry https://registry.npmjs.org --network-timeout 300000
|
run: yarn install --frozen-lockfile --ignore-platform --registry https://registry.npmjs.org --network-timeout 300000
|
||||||
|
@ -72,13 +74,8 @@ jobs:
|
||||||
run: yarn build:test:armv7
|
run: yarn build:test:armv7
|
||||||
|
|
||||||
- name: Setup and run tests
|
- name: Setup and run tests
|
||||||
uses: docker://multiarch/ubuntu-core:armhf-focal
|
uses: addnab/docker-run-action@v3
|
||||||
with:
|
with:
|
||||||
args: >
|
image: ghcr.io/napi-rs/napi-rs/nodejs:armhf-14
|
||||||
sh -c "
|
options: -v ${{ github.workspace }}:/build -w /build
|
||||||
apt-get update && \
|
run: yarn test
|
||||||
apt-get install -y ca-certificates gnupg2 curl && \
|
|
||||||
curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
|
|
||||||
apt-get install -y nodejs && \
|
|
||||||
npm test
|
|
||||||
"
|
|
||||||
|
|
|
@ -63,6 +63,7 @@ jobs:
|
||||||
- host: ubuntu-latest
|
- host: ubuntu-latest
|
||||||
target: 'aarch64-unknown-linux-gnu'
|
target: 'aarch64-unknown-linux-gnu'
|
||||||
setup: |
|
setup: |
|
||||||
|
sudo apt-get update
|
||||||
sudo apt-get install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu -y
|
sudo apt-get install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu -y
|
||||||
build: |
|
build: |
|
||||||
yarn build --target=aarch64-unknown-linux-gnu
|
yarn build --target=aarch64-unknown-linux-gnu
|
||||||
|
@ -70,6 +71,7 @@ jobs:
|
||||||
- host: ubuntu-latest
|
- host: ubuntu-latest
|
||||||
target: 'armv7-unknown-linux-gnueabihf'
|
target: 'armv7-unknown-linux-gnueabihf'
|
||||||
setup: |
|
setup: |
|
||||||
|
sudo apt-get update
|
||||||
sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf -y
|
sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf -y
|
||||||
build: |
|
build: |
|
||||||
yarn build --target=armv7-unknown-linux-gnueabihf
|
yarn build --target=armv7-unknown-linux-gnueabihf
|
||||||
|
|
Loading…
Reference in a new issue