Skip to content

Commit a884ad8

Browse files
committed
Merge branch 'master' of https://github.com/abeimler/setup-cpp into feature/cross-mingw
2 parents ae58022 + 3d4b6fc commit a884ad8

File tree

137 files changed

+6804
-4768
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+6804
-4768
lines changed

.dockerignore

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
1-
.parcel-cache/
2-
node_modules/
3-
dev/docker/
4-
dev/container-tests/
1+
.git/
2+
# OS metadata
3+
**/.DS_Store
4+
**/Thumbs.db
5+
6+
# Node
7+
**/node_modules
8+
**/package-lock.json
9+
**/temp-*
10+
11+
# TypeScript
12+
**/*.tsbuildinfo
13+
14+
# Build directories
15+
**/packages/*/dist/
16+
**/.parcel-cache
17+
**/exe/
18+
**/*.log
19+
**/*.exe
20+
**/.cache/

.eslintrc.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
{
22
"extends": "eslint-config-atomic",
3-
"ignorePatterns": ["dist/", "node_modules/", "dev/cpp_vcpkg_project"]
3+
"ignorePatterns": ["dist/", "node_modules/", "dev/cpp_vcpkg_project"],
4+
"rules": {
5+
"no-unused-vars": "off",
6+
"@typescript-eslint/no-unused-vars": [
7+
"warn",
8+
{
9+
"argsIgnorePattern": "^_",
10+
"varsIgnorePattern": "^_",
11+
"caughtErrorsIgnorePattern": "^_",
12+
"destructuredArrayIgnorePattern": "^_"
13+
}
14+
]
15+
}
416
}

.github/workflows/CI.yml

Lines changed: 44 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111

1212
jobs:
1313
Test:
14+
name: ${{ matrix.os }}
1415
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
1516
runs-on: ${{ matrix.os }}
1617
strategy:
@@ -21,15 +22,12 @@ jobs:
2122
- windows-2019
2223
- ubuntu-22.04
2324
- ubuntu-20.04
24-
- ubuntu-18.04
2525
- macos-12
2626
- macos-11
2727
node:
28-
- 16
28+
- 20
2929
pnpm:
30-
- 7
31-
cache_reset_counter:
32-
- 0
30+
- 8
3331
steps:
3432
- uses: actions/checkout@v3
3533
with:
@@ -41,6 +39,7 @@ jobs:
4139
path: |
4240
~/.pnpm-store
4341
D:\.pnpm-store
42+
./node_modules
4443
key: "setupcpp-cache-OS:${{ matrix.os }}-node:${{ matrix.node }}-pnpm:${{ matrix.pnpm }}-${{ hashFiles('./.npmrc') }}-deps:${{ hashFiles('./package.json') }}"
4544
restore-keys: |
4645
"setupcpp-cache-OS:${{ matrix.os }}-"
@@ -63,14 +62,13 @@ jobs:
6362
# uses: mxschmitt/action-tmate@v3
6463

6564
- name: Test
66-
if: "!contains(github.event.head_commit.message, '[skip test]')"
65+
if: "${{ !contains(github.event.head_commit.message, '[skip test]') }}"
6766
run: |
6867
pnpm run test
69-
continue-on-error: ${{ contains(matrix.os, 'ubuntu-18.04') }}
7068
7169
# Create self-contained executable that bundles Nodejs
7270
- name: Create Executable
73-
if: "contains(matrix.os, 'windows-2022') || contains(matrix.os, 'ubuntu-22.04') || contains(matrix.os, 'macos-12')"
71+
if: "${{ contains(matrix.os, 'windows-2022') || contains(matrix.os, 'ubuntu-22.04') || contains(matrix.os, 'macos-12') }}"
7472
run: |
7573
pnpm run pack.exe
7674
@@ -83,6 +81,22 @@ jobs:
8381
./dist
8482
retention-days: 1
8583

84+
- name: Setup Node 12
85+
uses: actions/setup-node@v3
86+
with:
87+
node-version: 12
88+
- name: Smoke Test Node 12
89+
run: |
90+
node ./dist/legacy/setup-cpp.js --help
91+
92+
- name: Setup Node 16
93+
uses: actions/setup-node@v3
94+
with:
95+
node-version: 16
96+
- name: Smoke Test Node 16
97+
run: |
98+
node ./dist/actions/setup-cpp.js --help
99+
86100
Release:
87101
needs: Test
88102
if: startsWith(github.ref, 'refs/tags/')
@@ -103,38 +117,32 @@ jobs:
103117
gzip: folders
104118
draft: true
105119
files: >
106-
./exe/setup_cpp_windows.exe
107-
./exe/setup_cpp_linux
108-
./exe/setup_cpp_mac
109-
./dist/node12/setup_cpp.js
110-
./dist/node12/setup_cpp.js.map
111-
./dist/node12/
112-
./dist/node16/
120+
./exe/setup-cpp-x64-windows.exe
121+
./exe/setup-cpp-x64-linux
122+
./exe/setup-cpp-x64-macos
123+
./dist/legacy/setup-cpp.js
124+
./dist/legacy/setup-cpp.js.map
125+
./dist/legacy/
126+
./dist/actions/
127+
./dist/modern/
113128
114129
Docker:
115-
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip docker]') }}
130+
name: ${{ matrix.container }}
131+
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip test]') }}
116132
runs-on: ${{ matrix.os }}
117133
strategy:
118134
fail-fast: false
119135
matrix:
120136
os:
121-
- ubuntu-20.04
122-
container:
123-
- "ubuntu_node.dockerfile"
124-
- "ubuntu_node_16.dockerfile"
125-
- "ubuntu_node.mingw.dockerfile"
126-
- "ubuntu_22.04_node.dockerfile"
127-
- "ubuntu_20.04_node.dockerfile"
128-
- "arch_node.dockerfile"
129-
- "arch_node.mingw.dockerfile"
130-
- "fedora_node.dockerfile"
131-
- "fedora_node.mingw.dockerfile"
137+
- ubuntu-22.04
132138
node:
133-
- 14
139+
- 20
134140
pnpm:
135-
- 6
136-
cache_reset_counter:
137-
- 0
141+
- 8
142+
container:
143+
- "arch.dockerfile"
144+
- "fedora.dockerfile"
145+
- "ubuntu.dockerfile"
138146
steps:
139147
- uses: actions/checkout@v3
140148
with:
@@ -146,9 +154,11 @@ jobs:
146154
path: |
147155
~/.pnpm-store
148156
D:\.pnpm-store
149-
key: "setupcpp-docker-cache-OS:${{ matrix.os }}-node:${{ matrix.node }}-pnpm:${{ matrix.pnpm }}-${{ hashFiles('./.npmrc') }}-deps:${{ hashFiles('./package.json') }}-${{ matrix.cache_reset_counter }}"
157+
./node_modules
158+
key: "setupcpp-docker-cache-OS:${{ matrix.os }}-${{ hashFiles('./.npmrc') }}-deps:${{ hashFiles('./package.json') }}"
150159
restore-keys: |
151160
"setupcpp-docker-cache-OS:${{ matrix.os }}"
161+
152162
- name: Setup Node
153163
uses: actions/setup-node@v3
154164
with:
@@ -162,8 +172,9 @@ jobs:
162172
- name: Install and build
163173
run: |
164174
pnpm install
175+
pnpm build.docker_tests
165176
166177
- name: Build
167178
id: docker_build
168179
run: |
169-
docker build -f ./dev/docker/${{ matrix.container }} -t setup_cpp .
180+
docker build -f ./dev/docker/__tests__/${{ matrix.container }} -t setup-cpp .

.nvm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v18.15.0

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
node_modules
2+
package.json
23
pnpm-lock.yaml
34
package-lock.json
45
CHANGELOG.md

.terserrc.js

Lines changed: 0 additions & 22 deletions
This file was deleted.

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["orta.vscode-jest", "esbenp.prettier-vscode", "dbaeumer.vscode-eslint"]
3+
}

.vscode/launch.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"type": "node",
6+
"request": "launch",
7+
"name": "Jest Current File",
8+
"runtimeExecutable": "sh",
9+
"program": "node_modules/.bin/jest",
10+
"args": ["${relativeFile}"],
11+
"console": "integratedTerminal",
12+
"internalConsoleOptions": "openOnFirstSessionStart"
13+
}
14+
]
15+
}

0 commit comments

Comments
 (0)