forked from nodegit/nodegit
-
Notifications
You must be signed in to change notification settings - Fork 0
142 lines (133 loc) · 4.34 KB
/
Copy pathtests.yml
File metadata and controls
142 lines (133 loc) · 4.34 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
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
on:
push:
branches:
- master
- backport/*
tags:
- v*.*.*
pull_request:
jobs:
linux-test:
name: "test node ${{ matrix.node-version }} on linux"
env:
CC: clang-18
CXX: clang++-18
npm_config_clang: 1
GYP_DEFINES: use_obsolete_asm=true
DEBIAN_FRONTEND: "noninteractive"
runs-on: ubuntu-22.04
container: ubuntu:22.04
strategy:
matrix:
node-version: [22, 24, 26]
steps:
- name: prerequisites
run: |
apt-get update
apt-get install -y software-properties-common git build-essential clang libssl-dev libkrb5-dev libc++-dev wget python3 zlib1g-dev lsb-release gnupg
# Node 24+ headers use C++20 std::source_location, which needs
# clang >= 16; ubuntu 22.04 ships clang 14
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
./llvm.sh 18
- uses: actions/checkout@v5
with:
submodules: true
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
check-latest: true
- name: Test
run: |
set -xe
mkdir ~/.ssh_tests
chmod 700 ~/.ssh_tests
printf "%b" "Host *\n\tStrictHostKeyChecking no\n" > ~/.ssh_tests/config
cat test/id_rsa.pub > ~/.ssh_tests/id_rsa.pub
cat test/id_rsa.enc | base64 -d > ~/.ssh_tests/id_rsa
ls ~/.ssh_tests
chmod 600 ~/.ssh_tests/id_rsa*
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com
eval "$(ssh-agent -s)"
ssh-add ~/.ssh_tests/id_rsa
JOBS=2 npm install
npm test
mac-test:
name: "test node ${{ matrix.node-version }} on ${{ matrix.runner }}"
env:
CC: clang
CXX: clang++
npm_config_clang: 1
GYP_DEFINES: use_obsolete_asm=true
strategy:
matrix:
node-version: [22, 24, 26]
runner: ["macos-26", "macos-15-intel"]
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v5
with:
submodules: true
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
check-latest: true
- name: Test
run: |
set -xe
mkdir ~/.ssh_tests
chmod 700 ~/.ssh_tests
printf "%b" "Host *\n\tStrictHostKeyChecking no\n" > ~/.ssh_tests/config
cat test/id_rsa.pub > ~/.ssh_tests/id_rsa.pub
cat test/id_rsa.enc | base64 -d > ~/.ssh_tests/id_rsa
chmod 600 ~/.ssh_tests/id_rsa*
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com
eval "$(ssh-agent -s)"
ssh-add ~/.ssh_tests/id_rsa
JOBS=2 npm install
npm test
linux-arm-test:
name: "test node ${{ matrix.node-version }} on linux-arm"
env:
CC: clang-18
CXX: clang++-18
npm_config_clang: 1
GYP_DEFINES: use_obsolete_asm=true
runs-on: ubuntu-22.04-arm
strategy:
matrix:
node-version: [22, 24, 26]
steps:
- uses: actions/checkout@v5
with:
submodules: true
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
check-latest: true
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y software-properties-common git build-essential clang libssl-dev libkrb5-dev libc++-dev wget python3 zlib1g-dev lsb-release gnupg
# Node 24+ headers use C++20 std::source_location, which needs
# clang >= 16; ubuntu 22.04 ships clang 14
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 18
- name: Test
run: |
set -xe
mkdir ~/.ssh_tests
chmod 700 ~/.ssh_tests
printf "%b" "Host *\n\tStrictHostKeyChecking no\n" > ~/.ssh_tests/config
cat test/id_rsa.pub > ~/.ssh_tests/id_rsa.pub
cat test/id_rsa.enc | base64 -d > ~/.ssh_tests/id_rsa
chmod 600 ~/.ssh_tests/id_rsa*
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com
eval "$(ssh-agent -s)"
ssh-add ~/.ssh_tests/id_rsa
JOBS=2 npm install
npm test