-
-
Notifications
You must be signed in to change notification settings - Fork 17
98 lines (83 loc) · 3.02 KB
/
nodejs.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-24.04
- windows-2019
- windows-2022
#- macos-10.15
node-version:
- 18.x
- 20.x
- 22.x
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Firebird install (Linux)
if: startsWith(matrix.os, 'ubuntu-')
run: |
sudo apt-get install libtommath1 libtomcrypt1
wget -nv -O Firebird-4.0.2.2816-0.amd64.tar.gz "https://github.com/FirebirdSQL/firebird/releases/download/v4.0.2/Firebird-4.0.2.2816-0.amd64.tar.gz"
tar xzvf Firebird-4.0.2.2816-0.amd64.tar.gz
(cd Firebird-4.0.2.2816-0.amd64; sudo ./install.sh -silent)
sudo usermod -a -G firebird `whoami`
sudo gpasswd -r firebird
- name: Firebird install (MacOS)
if: startsWith(matrix.os, 'macos-')
run: |
wget -nv -O Firebird-3.0.7-33374-x86_64.pkg "https://github.com/FirebirdSQL/firebird/releases/download/R3_0_7/Firebird-3.0.7-33374-x86_64.pkg"
sudo installer -verbose -pkg "Firebird-3.0.7-33374-x86_64.pkg" -target /
- name: Firebird install (Windows)
if: startsWith(matrix.os, 'windows-')
shell: cmd
run: |
set FB_ZIP=Firebird-4.0.2.2816-0-x64.zip
powershell Invoke-WebRequest "https://github.com/FirebirdSQL/firebird/releases/download/v4.0.2/$env:FB_ZIP" -OutFile "$env:FB_ZIP"
7z x -oC:\Firebird %FB_ZIP%
- name: Build
shell: bash
run: |
yarn
yarn bootstrap
- name: Test (Linux)
if: startsWith(matrix.os, 'ubuntu-')
run: |
sg firebird -c "LD_LIBRARY_PATH=/usr/lib64 yarn test"
- name: Test (MacOS)
if: startsWith(matrix.os, 'macos-')
run: |
sudo mkdir `pwd`/tmp-node-fb
sudo chmod 777 `pwd`/tmp-node-fb
export ISC_USER=sysdba
export ISC_PASSWORD=masterkey
export NODE_FB_TEST_TMP_DIR=`pwd`/tmp-node-fb
yarn test
- name: Test (Windows)
if: startsWith(matrix.os, 'windows-')
shell: cmd
run: |
set PATH=C:\Firebird;%PATH%
call yarn test
- name: Upload native-api-${{ matrix.os }}-${{ matrix.node-version }}
uses: actions/upload-artifact@v4
with:
name: native-api-${{ matrix.os }}-${{ matrix.node-version }}
path: packages/node-firebird-native-api
- name: Upload driver-${{ matrix.os }}-${{ matrix.node-version }}
uses: actions/upload-artifact@v4
with:
name: driver-${{ matrix.os }}-${{ matrix.node-version }}
path: packages/node-firebird-driver
- name: Upload driver-native-${{ matrix.os }}-${{ matrix.node-version }}
uses: actions/upload-artifact@v4
with:
name: driver-native-${{ matrix.os }}-${{ matrix.node-version }}
path: packages/node-firebird-driver-native