Skip to content

Commit

Permalink
feat(ci): windows
Browse files Browse the repository at this point in the history
  • Loading branch information
gorillamoe committed Oct 13, 2024
1 parent e953508 commit bfb43fd
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 16 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
name: Test on Windows

on:
# Allows you to run this workflow manually from the Actions tab
pull_request:
branches:
- main
workflow_dispatch:

jobs:
test-linux:
test-windows:
name: Test Windows
runs-on: windows-latest
steps:
Expand All @@ -16,8 +18,17 @@ jobs:
with:
path: |
.tests
~\scoop
key: ${{ runner.os }}-tests
- name: Install dependencies
run: ./scripts/install-ci-test-requirements.ps1
- name: Save cache
id: cache-primes-save
uses: actions/cache/save@v4
with:
path: |
.tests
~\scoop
key: ${{ runner.os }}-tests
- name: Run tests
run: ./scripts/tests.ps1
27 changes: 13 additions & 14 deletions scripts/install-ci-test-requirements.ps1
Original file line number Diff line number Diff line change
@@ -1,39 +1,38 @@
setx /M KULALA_ROOT_DIR (Get-Location).Path
setx /M LUAJIT_FOR_WIN_REPO \"luajit-for-win64\"
setx /M LUAJIT_FOR_WIN_RELEASE \"0.0.2\"

if (!(Test-Path .tests)) {
mkdir .tests
}

cd .tests

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression

# required before add extras
scoop install main/git

# add for extras suggested by neovim
scoop bucket add extras

scoop install extras/vcredist2022
scoop install main/neovim@0.10.2

Invoke-RestMethod -Uri \"https://github.com/mistweaverco/$Env:LUAJIT_FOR_WIN_REPO/archive/refs/tags/v$Env:LUAJIT_FOR_WIN_RELEASE.zip\" -outfile luajit.zip
Invoke-RestMethod -Uri https://github.com/mistweaverco/luajit-for-win64/archive/refs/tags/v0.0.2.zip -outfile luajit.zip
7z x luajit.zip

RM luajit.zip

cd \"$Env:LUAJIT_FOR_WIN_REPO-$Env:LUAJIT_FOR_WIN_RELEASE\"
cd luajit-for-win64-0.0.2

.\luajit-for-win64.cmd

setx /M KULALA_LUA_DIR (Get-Location).Path

setx /M PATH \"$Env:KULALA_LUA_DIR\tools\cmd;$Env:KULALA_LUA_DIR\tools\PortableGit\mingw64\bin;$Env:KULALA_LUA_DIR\tools\PortableGit\usr\bin;$Env:KULALA_LUA_DIR\tools\mingw\bin;$Env:KULALA_LUA_DIR\lib;$Env:KULALA_LUA_DIR\bin;$Env:APPDATA\LJ4W\LuaRocks\bin;$Env:path\"
setx /M PATH \"$Env:KULALA_LUA_DIR\tools\cmd;$Env:KULALA_LUA_DIR\tools\PortableGit\mingw64\bin;$Env:KULALA_LUA_DIR\tools\PortableGit\usr\bin;$Env:KULALA_LUA_DIR\tools\mingw\bin;$Env:KULALA_LUA_DIR\lib;$Env:KULALA_LUA_DIR\bin;$Env:APPDATA\LJ4W\LuaRocks\bin;$Env:PATH\"
setx /M LUA_PATH \"$Env:KULALA_LUA_DIR\lua\?.lua;$Env:KULALA_LUA_DIR\lua\?\init.lua;$Env:APPDATA\luarocks\share\lua\5.1\?.lua;$Env:APPDATA\luarocks\share\lua\5.1\?\init.lua;$Env:LUA_PATH\"
setx /M LUA_CPATH \"$Env:APPDATA\luarocks;$Env:APPDATA\luarocks\lib\lua\5.1\?.dll;$Env:LUA_CPATH\"

Write-Host \"Path: $Env:PATH.Split(';')\"
Write-Host \"LUA_PATH: $Env:LUA_PATH.Split(';')\"
Write-Host \"LUA_CPATH: $Env:LUA_CPATH.Split(';')\"
Write-Host "Path"
Write-Host $Env:PATH.Split(';')
Write-Host "LUA_PATH"
Write-Host $Env:LUA_PATH.Split(';')
Write-Host "LUA_CPATH"
Write-Host $Env:LUA_CPATH.Split(';')

luarocks install --lua-version 5.1 busted

Expand Down

0 comments on commit bfb43fd

Please sign in to comment.