Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug: test cppcheck installation on Windows #187

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
264 changes: 132 additions & 132 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,67 +71,67 @@ jobs:
./dev/docker/__tests__/
retention-days: 1

BuildExecutable:
name: Build-Executable-${{ matrix.os }}
needs: [Build]
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- windows-2022
- ubuntu-22.04
- macos-12
node:
- 20
pnpm:
- 8
steps:
- uses: actions/checkout@v3

- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: dist

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Setup Pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ matrix.pnpm }}

- name: Cache node_modules
uses: actions/cache@v3
with:
path: |
~/.pnpm-store
D:\.pnpm-store
./node_modules
key: "setupcpp-node_modules-cache-OS:${{ matrix.os }}-node:${{ matrix.node }}-pnpm:${{ matrix.pnpm }}-${{ hashFiles('./.npmrc') }}-deps:${{ hashFiles('./package.json') }}"
restore-keys: |
"setupcpp-node_modules-cache-OS:${{ matrix.os }}-"

- name: Install
run: |
pnpm install

# Create self-contained executable that bundles Nodejs
- name: Create Executable
run: |
pnpm run pack.exe

- name: Upload Executables
uses: actions/upload-artifact@v3
with:
name: exe
path: |
./exe
retention-days: 1
# BuildExecutable:
# name: Build-Executable-${{ matrix.os }}
# needs: [Build]
# if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
# runs-on: ${{ matrix.os }}
# strategy:
# fail-fast: false
# matrix:
# os:
# - windows-2022
# - ubuntu-22.04
# - macos-12
# node:
# - 20
# pnpm:
# - 8
# steps:
# - uses: actions/checkout@v3

# - name: Download Artifacts
# uses: actions/download-artifact@v3
# with:
# name: dist

# - name: Setup Node
# uses: actions/setup-node@v3
# with:
# node-version: ${{ matrix.node }}

# - name: Setup Pnpm
# uses: pnpm/action-setup@v2
# with:
# version: ${{ matrix.pnpm }}

# - name: Cache node_modules
# uses: actions/cache@v3
# with:
# path: |
# ~/.pnpm-store
# D:\.pnpm-store
# ./node_modules
# key: "setupcpp-node_modules-cache-OS:${{ matrix.os }}-node:${{ matrix.node }}-pnpm:${{ matrix.pnpm }}-${{ hashFiles('./.npmrc') }}-deps:${{ hashFiles('./package.json') }}"
# restore-keys: |
# "setupcpp-node_modules-cache-OS:${{ matrix.os }}-"

# - name: Install
# run: |
# pnpm install

# # Create self-contained executable that bundles Nodejs
# - name: Create Executable
# run: |
# pnpm run pack.exe

# - name: Upload Executables
# uses: actions/upload-artifact@v3
# with:
# name: exe
# path: |
# ./exe
# retention-days: 1

Test:
name: Test-${{ matrix.os }}
Expand All @@ -143,11 +143,11 @@ jobs:
matrix:
os:
- windows-2022
- windows-2019
- ubuntu-22.04
- ubuntu-20.04
- macos-12
- macos-11
# - windows-2019
# - ubuntu-22.04
# - ubuntu-20.04
# - macos-12
# - macos-11
node:
- 20
pnpm:
Expand Down Expand Up @@ -210,69 +210,69 @@ jobs:
run: |
node ./dist/actions/setup-cpp.js --help

Docker:
name: Test-${{ matrix.container }}
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip test]') }}
needs: [Build]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
node:
- 20
pnpm:
- 8
container:
- "ubuntu.dockerfile"
- "fedora.dockerfile"
- "arch.dockerfile"
- "ubuntu-mingw.dockerfile"
# - "fedora-mingw.dockerfile"
# - "arch-mingw.dockerfile"
steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Download Dist
uses: actions/download-artifact@v3
with:
name: dist

- name: Build
id: docker_build
run: |
docker build -f ./dev/docker/__tests__/${{ matrix.container }} -t setup-cpp .

Release:
if: startsWith(github.ref, 'refs/tags/')
needs: [Build, BuildExecutable, Test, Docker]
runs-on: ubuntu-22.04
steps:
- name: Download All Artifacts
uses: actions/download-artifact@v3

- name: Place Artifacts
shell: bash
run: |
mv -v ./dist/* ./
mv -v ./exe/* ./
chmod +x -R ./exe/

- name: Draft the release
uses: meeDamian/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
gzip: folders
draft: true
files: >
./exe/setup-cpp-x64-windows.exe
./exe/setup-cpp-x64-linux
./exe/setup-cpp-x64-macos
./dist/legacy/setup-cpp.js
./dist/legacy/setup-cpp.js.map
./dist/legacy/
./dist/actions/
./dist/modern/
# Docker:
# name: Test-${{ matrix.container }}
# if: ${{ !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip test]') }}
# needs: [Build]
# runs-on: ${{ matrix.os }}
# strategy:
# fail-fast: false
# matrix:
# os:
# - ubuntu-22.04
# node:
# - 20
# pnpm:
# - 8
# container:
# - "ubuntu.dockerfile"
# - "fedora.dockerfile"
# - "arch.dockerfile"
# - "ubuntu-mingw.dockerfile"
# # - "fedora-mingw.dockerfile"
# # - "arch-mingw.dockerfile"
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: true

# - name: Download Dist
# uses: actions/download-artifact@v3
# with:
# name: dist

# - name: Build
# id: docker_build
# run: |
# docker build -f ./dev/docker/__tests__/${{ matrix.container }} -t setup-cpp .

# Release:
# if: startsWith(github.ref, 'refs/tags/')
# needs: [Build, BuildExecutable, Test, Docker]
# runs-on: ubuntu-22.04
# steps:
# - name: Download All Artifacts
# uses: actions/download-artifact@v3

# - name: Place Artifacts
# shell: bash
# run: |
# mv -v ./dist/* ./
# mv -v ./exe/* ./
# chmod +x -R ./exe/

# - name: Draft the release
# uses: meeDamian/[email protected]
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# gzip: folders
# draft: true
# files: >
# ./exe/setup-cpp-x64-windows.exe
# ./exe/setup-cpp-x64-linux
# ./exe/setup-cpp-x64-macos
# ./dist/legacy/setup-cpp.js
# ./dist/legacy/setup-cpp.js.map
# ./dist/legacy/
# ./dist/actions/
# ./dist/modern/
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"test.lint": "run-p --aggregate-output --continue-on-error lint.cspell test.lint.eslint test.lint.prettier lint.tsc",
"test.lint.eslint": "eslint **/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml} --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/",
"test.lint.prettier": "prettier . --check",
"test": "jest",
"test": "jest --runInBand --detectOpenHandles",
"build.docker_tests": "node ./dev/docker/__tests__/generate-docker-tests.mjs",
"build.docker.arch": "pnpm build.docker_tests && docker build -f ./dev/docker/__tests__/arch.dockerfile -t setup-cpp:arch .",
"build.docker.fedora": "pnpm build.docker_tests && docker build -f ./dev/docker/__tests__/fedora.dockerfile -t setup-cpp:fedora .",
Expand Down