Skip to content
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
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: npm
directory: /
schedule:
interval: weekly

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
52 changes: 41 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,32 @@ on:
push:
branches:
- master
- dev
- main
- release/*
schedule:
- cron: '0 6 * * *'

jobs:
test:
name: default
runs-on: windows-latest
name: default (${{ matrix.runner }}, VS ${{ matrix.vsversion }})
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- runner: windows-2022
vsversion: "2022"
supports_arm32: true
- runner: windows-2025
vsversion: "2022"
supports_arm32: true
- runner: windows-2025-vs2026
vsversion: "2026"
supports_arm32: false
steps:
- name: Check out source code
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Download Internet
run: npm install
- name: Run eslint
Expand All @@ -24,6 +39,7 @@ jobs:
uses: ./
with:
arch: amd64
vsversion: ${{ matrix.vsversion }}
- name: Compile and run some C code (amd64)
shell: cmd
run: |
Expand All @@ -33,50 +49,64 @@ jobs:
uses: ./
with:
arch: amd64_x86
vsversion: ${{ matrix.vsversion }}
- name: Compile and run some C code (x86)
shell: cmd
run: |
cl.exe hello.c
hello.exe
- name: Enable Developer Command Prompt (amd64_arm)
if: matrix.supports_arm32
uses: ./
with:
arch: amd64_arm
vsversion: ${{ matrix.vsversion }}
- name: Compile some C code (arm)
if: matrix.supports_arm32
shell: cmd
run: |
cl.exe hello.c
dumpbin /headers hello.exe
cl.exe /c hello.c
dumpbin /headers hello.obj
- name: Enable Developer Command Prompt (amd64_arm64)
uses: ./
with:
arch: amd64_arm64
vsversion: ${{ matrix.vsversion }}
- name: Compile some C code (arm64)
shell: cmd
run: |
cl.exe hello.c
dumpbin /headers hello.exe
cl.exe /c hello.c
dumpbin /headers hello.obj
audit:
name: npm audit
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v4
uses: actions/checkout@v6
- run: npm install
- run: npm audit --audit-level=moderate --production
- run: npm audit --audit-level=critical
alias-arch:
name: arch aliases
runs-on: windows-latest
name: arch aliases (${{ matrix.runner }}, VS ${{ matrix.vsversion }})
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- runner: windows-2022
vsversion: "2022"
- runner: windows-2025
vsversion: "2022"
steps:
- name: Check out source code
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Download Internet
run: npm install
- name: Enable Developer Command Prompt
uses: ./
with:
arch: Win32
vsversion: ${{ matrix.vsversion }}
- name: Compile and run some C code
shell: cmd
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
name: release
runs-on: windows-latest
steps:
- name: Setup Developer Command Prompt
uses: ilammy/msvc-dev-cmd@release/v1
- name: Check out source code
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Setup Developer Command Prompt
uses: ./
- name: Compile and run some C code
shell: cmd
run: |
Expand All @@ -26,6 +26,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v4
uses: actions/checkout@v6
- run: npm audit --audit-level=moderate --production
- run: npm audit --audit-level=critical
6 changes: 3 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ inputs:
sdk:
description: Windows SDK number to build for
spectre:
description: Enable Specre mitigations
description: Enable Spectre mitigations
toolset:
description: VC++ compiler toolset version
uwp:
description: Build for Universal Windows Platform
vsversion:
description: The Visual Studio version to use. This can be the version number (e.g. 16.0 for 2019) or the year (e.g. "2019").
runs:
using: node20
main: index.js
using: node24
main: dist/index.js
branding:
icon: terminal
color: purple
1 change: 1 addition & 0 deletions dist/index.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const EDITIONS = ['Enterprise', 'Professional', 'Community', 'BuildTools']
const YEARS = ['2022', '2019', '2017']

const VsYearVersion = {
'2026': '18.0',
'2022': '17.0',
'2019': '16.0',
'2017': '15.0',
Expand Down Expand Up @@ -112,7 +113,7 @@ function isPathVariable(name) {

function filterPathValue(path) {
let paths = path.split(';')
// Remove duplicates by keeping the first occurance and preserving order.
// Remove duplicates by keeping the first occurrence and preserving order.
// This keeps path shadowing working as intended.
function unique(value, index, self) {
return self.indexOf(value) === index
Expand Down
Loading