Skip to content

Commit

Permalink
ci: drop testing node 16 / node 18 arm64 linux in gha
Browse files Browse the repository at this point in the history
  • Loading branch information
YOU54F committed May 11, 2024
1 parent adbc60e commit a7883aa
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 54 deletions.
71 changes: 28 additions & 43 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ jobs:
uses: docker/setup-qemu-action@v3
- if: ${{ matrix.docker == true && matrix.alpine == true }}
name: prebuild linux ${{ matrix.arch }} musl
run: docker run -v $PWD:/home/node/app --platform linux/${{ matrix.arch }} -e CIRRUS_CI=true --rm node:20-alpine bin/sh -c 'apk add bash && cd /home/node/app && bash -c "/home/node/app/script/ci/prebuild-alpine.sh" && rm -rf ffi node_modules'
run: docker run -v $PWD:/home --platform linux/${{ matrix.arch }} -e CIRRUS_CI=true --rm node:20-alpine bin/sh -c 'apk add bash && cd /home && bash -c "/home/script/ci/prebuild-alpine.sh" && rm -rf ffi node_modules'

- if: ${{ matrix.docker == true && matrix.alpine != true }}
name: prebuild linux ${{ matrix.arch }}
run: docker run -v $PWD:/home/node/app --platform linux/${{ matrix.arch }} -e CIRRUS_CI=true --rm node:20 bin/bash -c 'cd /home/node/app && /home/node/app/script/ci/prebuild.sh && rm -rf ffi node_modules'
run: docker run -v $PWD:/home --platform linux/${{ matrix.arch }} -e CIRRUS_CI=true --rm node:20 bin/bash -c 'cd /home && /home/script/ci/prebuild.sh && rm -rf ffi node_modules'

- run: sudo chown -R $(id -u):$(id -g) prebuilds
if: ${{ matrix.docker == true }}
Expand Down Expand Up @@ -141,11 +141,6 @@ jobs:
alpine: true
arch: amd64
node-version: 20
- os: ubuntu-latest
docker: true
alpine: false
arch: arm64
node-version: 18
- os: ubuntu-latest
docker: true
alpine: true
Expand All @@ -156,21 +151,26 @@ jobs:
alpine: true
arch: amd64
node-version: 18
- os: ubuntu-latest
docker: true
alpine: false
arch: arm64
node-version: 16
- os: ubuntu-latest
docker: true
alpine: true
arch: arm64
node-version: 16
- os: ubuntu-latest
docker: true
alpine: true
arch: amd64
node-version: 16
# - os: ubuntu-latest
# docker: true
# alpine: false
# arch: arm64
# node-version: 18
# - os: ubuntu-latest
# docker: true
# alpine: false
# arch: arm64
# node-version: 16
# - os: ubuntu-latest
# docker: true
# alpine: true
# arch: arm64
# node-version: 16
# - os: ubuntu-latest
# docker: true
# alpine: true
# arch: amd64
# node-version: 16

name: Test ${{ matrix.docker == true && matrix.alpine == true && 'linux-musl' || matrix.docker == true && matrix.alpine == false && 'linux' || matrix.os }}-${{ matrix.arch }}-node-${{ matrix.node-version }}

Expand Down Expand Up @@ -206,34 +206,19 @@ jobs:
if: ${{ matrix.docker == true && matrix.arch == 'arm64' }}
uses: docker/setup-qemu-action@v3

- if: ${{ matrix.docker == true && matrix.alpine != true && matrix.arch == 'arm64' && matrix.node-version != 16 }}
name: test arm64
run: docker run -v $PWD:/home/node/app --platform linux/${{ matrix.arch }} -e SKIP_STANDALONE_TESTS --rm node:${{ matrix.node-version }} bin/bash -c 'apt install -y shared-mime-info && cd /home/node/app && /home/node/app/script/ci/unpack-and-test.sh'
env:
SKIP_STANDALONE_TESTS: true

- if: ${{ matrix.docker == true && matrix.alpine == true && matrix.arch == 'amd64' && matrix.node-version != 16 }}
name: test linux amd64 musl
run: docker run -v $PWD:/home/node/app --platform linux/${{ matrix.arch }} --rm node:${{ matrix.node-version }}-alpine bin/sh -c 'apk add bash curl gcompat shared-mime-info file && cd /home/node/app && /home/node/app/script/ci/unpack-and-test.sh'

- if: ${{ matrix.docker == true && matrix.alpine == true && matrix.arch == 'arm64' && matrix.node-version != 16 }}
name: test linux arm64 musl
run: docker run -v $PWD:/home/node/app --platform linux/${{ matrix.arch }} -e SKIP_STANDALONE_TESTS --rm node:${{ matrix.node-version }}-alpine bin/sh -c 'apk add bash curl libc6-compat gcompat shared-mime-info file protoc protobuf-dev && cd /home/node/app && /home/node/app/script/ci/unpack-and-test.sh'
env:
SKIP_STANDALONE_TESTS: true
- if: ${{ matrix.docker == true && matrix.alpine != true && matrix.arch == 'arm64' && matrix.node-version == 16 }}
- if: ${{ matrix.docker == true && matrix.alpine != true && matrix.arch == 'arm64' }}
name: test arm64
run: docker run -v $PWD:/home/node/app --platform linux/${{ matrix.arch }} -e SKIP_STANDALONE_TESTS --rm node:${{ matrix.node-version }} bin/bash -c 'npm config set cache /tmp && apt install -y shared-mime-info && cd /home/node/app && /home/node/app/script/ci/unpack-and-test.sh'
run: docker run -v $PWD:/home --platform linux/${{ matrix.arch }} -e SKIP_STANDALONE_TESTS --rm node:${{ matrix.node-version }} bin/bash -c 'apt install -y shared-mime-info && cd /home && /home/script/ci/unpack-and-test.sh'
env:
SKIP_STANDALONE_TESTS: true

- if: ${{ matrix.docker == true && matrix.alpine == true && matrix.arch == 'amd64' && matrix.node-version == 16 }}
- if: ${{ matrix.docker == true && matrix.alpine == true && matrix.arch == 'amd64' }}
name: test linux amd64 musl
run: docker run -v $PWD:/home/node/app --platform linux/${{ matrix.arch }} --rm node:${{ matrix.node-version }}-alpine bin/sh -c 'npm config set cache /tmp && apk add bash curl gcompat shared-mime-info file && cd /home/node/app && /home/node/app/script/ci/unpack-and-test.sh'
run: docker run -v $PWD:/home --platform linux/${{ matrix.arch }} --rm node:${{ matrix.node-version }}-alpine bin/sh -c 'apk add bash curl gcompat shared-mime-info file && cd /home && /home/script/ci/unpack-and-test.sh'

- if: ${{ matrix.docker == true && matrix.alpine == true && matrix.arch == 'arm64' && matrix.node-version == 16 }}
- if: ${{ matrix.docker == true && matrix.alpine == true && matrix.arch == 'arm64' }}
name: test linux arm64 musl
run: docker run -v $PWD:/home/node/app --platform linux/${{ matrix.arch }} -e SKIP_STANDALONE_TESTS --rm node:${{ matrix.node-version }}-alpine bin/sh -c 'npm config set cache /tmp && apk add bash curl libc6-compat gcompat shared-mime-info file protoc protobuf-dev && cd /home/node/app && /home/node/app/script/ci/unpack-and-test.sh'
run: docker run -v $PWD:/home --platform linux/${{ matrix.arch }} -e SKIP_STANDALONE_TESTS --rm node:${{ matrix.node-version }}-alpine bin/sh -c 'apk add bash curl shared-mime-info file protoc protobuf-dev && cd /home && /home/script/ci/unpack-and-test.sh'
env:
SKIP_STANDALONE_TESTS: true

Expand Down
12 changes: 1 addition & 11 deletions script/ci/build-and-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,7 @@ fi

node --version
npm --version
# if [[ ${CI:-} == 'true' && "$(uname -s)" == 'Linux' && "$(uname -m)" == 'aarch64' && "$(node --version)" == *18* ]]; then
# # npm ERR! code ECONNRESET
# # npm ERR! errno ECONNRESET
# # npm ERR! network request to https://registry.npmjs.org/ failed, reason: Client network socket disconnected before secure TLS connection was established
# npm config set maxsockets 1
# fi
# if [[ ${CI:-} == 'true' && "$(uname -s)" == 'Linux' && "$(uname -m)" == 'aarch64' && "$(node --version)" == *16* ]]; then
# # Setting the cache location is a workaround for node 16 install errors https://github.com/npm/cli/issues/5114
# npm config set cache /tmp
# fi
npm ci --ignore-scripts --maxsockets 1
npm ci --ignore-scripts

npm run format:check
npm run lint
Expand Down

0 comments on commit a7883aa

Please sign in to comment.