-
Notifications
You must be signed in to change notification settings - Fork 26
67 lines (62 loc) · 2.1 KB
/
node.js.yml
File metadata and controls
67 lines (62 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Server binaries
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
if: ${{ false }} # disable for now
runs-on: ubuntu-18.04
strategy:
matrix:
include:
- arch: armv7
distro: ubuntu18.04
base: arm32v7/node:18-buster
target: node18-linuxstatic-armv7
#node-version: [14.x]
#pkg-target: ["node14-windows-x64", "node14-linux-x64", "node14-linux-armv7"]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- uses: uraimo/run-on-arch-action@v2
name: Build artifact
id: build
with:
#arch: ${{ matrix.arch }}
#distro: ${{ matrix.distro }}
base_image: ${{ matrix.base }}
githubToken: ${{ github.token }}
setup: |
mkdir -p "${PWD}/artifacts"
dockerRunArgs: |
--volume "${PWD}/artifacts:/artifacts"
env: | # YAML, but pipe character is necessary
artifact_name: git-${{ matrix.distro }}_${{ matrix.arch }}
shell: /bin/sh
install: |
case "${{ matrix.distro }}" in
ubuntu*|jessie|stretch|buster|bullseye)
apt-get update -q -y
apt-get install -q -y git
;;
fedora*)
dnf -y update
dnf -y install git which
;;
alpine*)
apk update
apk add git
;;
esac
run: |
uname -a
cd server
npm i -g pkg
pkg --targets ${{ matrix.target }} --out-path /artifacts/ .
- name: Show the artifact
run: |
ls -al "${PWD}/artifacts"