forked from launchql/libpg-query-node
-
Notifications
You must be signed in to change notification settings - Fork 5
80 lines (72 loc) · 2.38 KB
/
ci.yml
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
68
69
70
71
72
73
74
75
76
77
78
79
80
name: CI (GitHub)
on:
- push
- pull_request
permissions: {}
jobs:
CI:
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: write
name: ${{ matrix.os }} - Node.js ${{ matrix.nodejs_version }} ${{ matrix.nodejs_arch }}
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
container: rockylinux:8
nodejs_version: 20
- os: ubuntu-latest
container: node:20-alpine3.20
- os: macos-latest
nodejs_version: 20
nodejs_arch: x64
- os: macos-latest
nodejs_version: 20
nodejs_arch: arm64
# - os: windows-latest
# nodejs_version: 20
# nodejs_arch: x86
# - os: windows-latest
# nodejs_version: 20
# nodejs_arch: x64
steps:
- uses: pnpm/action-setup@v4
with:
version: 9.7.1
- name: Dependencies (Rocky Linux glibc)
if: contains(matrix.container, 'rockylinux')
run: |
curl -sL https://rpm.nodesource.com/setup_${{ matrix.nodejs_version }}.x | bash -
dnf install -y gcc-toolset-11-gcc-c++ make git python3.12 nodejs
echo "/opt/rh/gcc-toolset-11/root/usr/bin" >> $GITHUB_PATH
echo "PYTHON=/usr/bin/python3.12" >> $GITHUB_ENV
- name: Dependencies (Linux musl)
if: contains(matrix.container, 'alpine')
run: apk add build-base git python3 --update-cache
- name: Dependencies (Python - macOS, Windows)
if: contains(matrix.os, 'macos') || contains(matrix.os, 'windows')
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Dependencies (Node.js - macOS, Windows)
if: contains(matrix.os, 'macos') || contains(matrix.os, 'windows')
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.nodejs_version }}
architecture: ${{ matrix.nodejs_arch }}
cache: pnpm
- name: Install
run: pnpm install --ignore-scripts
# - name: Test
# run: pnpm test
- name: Prebuild
env:
prebuild_upload: ${{ secrets.GITHUB_TOKEN }}
run: pnpm run ci:prebuild