From dd807ddd15ec51ef9fa168155c064b204678d412 Mon Sep 17 00:00:00 2001 From: Marco Kellershoff Date: Sun, 13 Oct 2024 20:45:43 +0200 Subject: [PATCH] feat(ci): windows --- .github/workflows/test-windows.yml | 7 +++++-- scripts/install-ci-test-requirements.ps1 | 26 ++++++++++-------------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 3f91761..bbbb220 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -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: @@ -16,6 +18,7 @@ jobs: with: path: | .tests + ~\scoop key: ${{ runner.os }}-tests - name: Install dependencies run: ./scripts/install-ci-test-requirements.ps1 diff --git a/scripts/install-ci-test-requirements.ps1 b/scripts/install-ci-test-requirements.ps1 index 9b677fc..40610b4 100644 --- a/scripts/install-ci-test-requirements.ps1 +++ b/scripts/install-ci-test-requirements.ps1 @@ -1,35 +1,31 @@ -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\" +$Env:KULALA_ROOT_DIR = (Get-Location).Path + +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 +$Env: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 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\" +$Env: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\" +$Env: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\" +$Env: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(';')\"