Skip to content

Commit a56d1ed

Browse files
committed
test
1 parent 20e391e commit a56d1ed

1 file changed

Lines changed: 37 additions & 1 deletion

File tree

.github/workflows/nix-build.yml

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,49 @@ jobs:
1010
test:
1111
strategy:
1212
matrix:
13-
os: [ubuntu-latest, macos-latest]
13+
os: [ubuntu-latest, macos-latest, windows-latest]
1414
runs-on: ${{ matrix.os }}
1515
steps:
1616
- uses: actions/checkout@v6
1717
with:
1818
fetch-depth: 0
19+
1920
- name: Install Nix
21+
if: runner.os != 'Windows'
2022
uses: DeterminateSystems/nix-installer-action@main
23+
2124
- name: Run checks
25+
if: runner.os != 'Windows'
2226
run: nix flake check -Lvv --log-format bar-with-logs
27+
28+
- name: Set up windows msvc compiler
29+
uses: step-security/msvc-dev-cmd@v1
30+
- name: Setup Lua (only 1 version because windows)
31+
if: runner.os == 'Windows'
32+
uses: leafo/gh-actions-lua@v13
33+
with:
34+
luaVersion: "5.1"
35+
36+
- name: Install LuaRocks
37+
if: runner.os == 'Windows'
38+
shell: powershell
39+
run: |
40+
Invoke-WebRequest `
41+
-Uri "https://luarocks.github.io/luarocks/releases/luarocks-3.13.0-windows-64.zip" `
42+
-OutFile "luarocks.zip"
43+
44+
$dir = Join-Path $env:RUNNER_TEMP "luarocks"
45+
New-Item -ItemType Directory -Force -Path "$dir"
46+
Expand-Archive luarocks.zip -DestinationPath (Join-Path $dir "luarocks-3.13.0-windows-64")
47+
$link = "./.lua/bin"
48+
tree /f /a "$dir"
49+
New-Item -ItemType Directory -Force -Path "$link"
50+
Copy-Item "$dir\*" -Destination "$link/luarocks" -Recurse -Force
51+
52+
- name: Build via luarocks
53+
if: runner.os == 'Windows'
54+
run: |
55+
luarocks make --verbose
56+
- name: Test via luarocks
57+
if: runner.os == 'Windows'
58+
run: luarocks test --verbose

0 commit comments

Comments
 (0)