Skip to content

Commit

Permalink
Move Windows CI from CirrusCI to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanTAllen committed Aug 10, 2023
1 parent 409b3f1 commit 2d84c8c
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 6 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -275,3 +275,45 @@ jobs:
run: make cross-libponyrt config=release CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ arch=armv7-a cross_cflags="-march=armv7-a -mtune=cortex-a9" cross_lflags="-O3;-march=arm"
- name: Test with Release Cross-Compiled Runtime
run: make test-cross-ci config=release PONYPATH=../armv7-a/release cross_triple=arm-unknown-linux-gnueabihf cross_arch=armv7-a cross_cpu=cortex-a9 cross_linker=arm-linux-gnueabihf-gcc cross_runner="qemu-arm-static -cpu cortex-a9 -L /usr/local/arm-linux-gnueabihf/libc"

x86_64-windows:
runs-on: windows-2022
defaults:
run:
shell: pwsh

name: x86-64 Windows MSVC
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Dependencies
run: |
Invoke-WebRequest -Uri 'https://www.python.org/ftp/python/3.10.10/python-3.10.10-embed-amd64.zip' -OutFile .\python_dlls.zip
Expand-Archive -Path .\python_dlls.zip -DestinationPath .
- name: Restore Libs Cache
id: restore-libs
uses: actions/cache/restore@v3
with:
path: build/libs
key: libs-windows2022-${{ hashFiles('make.ps1', 'CMakeLists.txt', 'libs/CMakeLists.txt') }}
- name: Build Libs
if: steps.restore-libs.outputs.cache-hit != 'true'
run: .\make.ps1 -Command libs -Generator "Visual Studio 17 2022"
- name: Save Libs Cache
if: steps.restore-libs.outputs.cache-hit != 'true'
uses: actions/cache/save@v3
with:
path: build/libs
key: libs-windows2022-${{ hashFiles('make.ps1', 'CMakeLists.txt', 'libs/CMakeLists.txt') }}
- name: Configure Debug Runtime
run: .\make.ps1 -Command configure -Config Debug -Generator "Visual Studio 17 2022"
- name: Build Debug Runtime
run: .\make.ps1 -Command build -Config Debug
- name: Test with Debug Runtime
run: .\make.ps1 -Command test -Config Debug -Uselldb yes
- name: Configure Release Runtime
run: .\make.ps1 -Command configure -Config Release
- name: Build Release Runtime
run: .\make.ps1 -Command build -Config Release
- name: Test with Release Runtime
run: .\make.ps1 -Command test -Config Release -Uselldb yes
13 changes: 7 additions & 6 deletions make.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
)

$srcDir = Split-Path $script:MyInvocation.MyCommand.Path
$lldbPath = 'C:\Program Files\LLVM\bin\lldb.exe'

switch ($Version)
{
Expand Down Expand Up @@ -241,7 +242,7 @@ switch ($Command.ToLower())

if ($Uselldb -eq "yes")
{
$lldbcmd = 'C:\msys64\mingw64\bin\lldb.exe'
$lldbcmd = $lldbPath
$lldbargs = @('--batch', '--one-line', 'run', '--one-line-on-crash', '"frame variable"', '--one-line-on-crash', '"register read"', '--one-line-on-crash', '"bt all"', '--one-line-on-crash', '"quit 1"', '--')
}

Expand Down Expand Up @@ -321,7 +322,7 @@ switch ($Command.ToLower())

if (-not (Test-Path $runOutDir)) { New-Item -ItemType Directory -Force -Path $runOutDir }
Write-Output "$buildDir\test\libponyc-run\runner\runner.exe --debug=$debugFlag --debugger=$debuggercmd --timeout_s=60 --max_parallel=1 --exclude=runner $debugFlag --test_lib=$outDir\test_lib --ponyc=$outDir\ponyc.exe --output=$runOutDir $srcDir\test\libponyc-run"
& $buildDir\test\libponyc-run\runner\runner.exe --debugger=$debuggercmd --timeout_s=60 --max_parallel=1 --exclude=runner --debug=$debugFlag --test_lib=$outDir\test_lib --ponyc=$outDir\ponyc.exe --output=$runOutDir $srcDir\test\libponyc-run
& $buildDir\test\libponyc-run\runner\runner.exe --debugger=$debuggercmd --timeout_s=60 --max_parallel=1 --exclude=runner --debug=$debugFlag --test_lib=$outDir\test_lib --ponyc=$outDir\ponyc.exe --output=$runOutDir --verbose $srcDir\test\libponyc-run
$err = $LastExitCode
if ($err -ne 0) { $failedTestSuites += "libponyc.run.tests.$runConfig" }
}
Expand Down Expand Up @@ -435,7 +436,7 @@ switch ($Command.ToLower())
}
"stress-test-release"
{
$lldbcmd = 'C:\msys64\mingw64\bin\lldb.exe'
$lldbcmd = $lldbPath
$lldbargs = @('--batch', '--one-line', 'run', '--one-line-on-crash', '"frame variable"', '--one-line-on-crash', '"register read"', '--one-line-on-crash', '"bt all"', '--one-line-on-crash', '"quit 1"', '--')

& $outDir\ponyc.exe --bin-name=ubench --output=$outDir test\rt-stress\string-message-ubench
Expand All @@ -446,7 +447,7 @@ switch ($Command.ToLower())
}
"stress-test-with-cd-release"
{
$lldbcmd = 'C:\msys64\mingw64\bin\lldb.exe'
$lldbcmd = $lldbPath
$lldbargs = @('--batch', '--one-line', 'run', '--one-line-on-crash', '"frame variable"', '--one-line-on-crash', '"register read"', '--one-line-on-crash', '"bt all"', '--one-line-on-crash', '"quit 1"', '--')

& $outDir\ponyc.exe --bin-name=ubench --output=$outDir test\rt-stress\string-message-ubench
Expand All @@ -457,7 +458,7 @@ switch ($Command.ToLower())
}
"stress-test-debug"
{
$lldbcmd = 'C:\msys64\mingw64\bin\lldb.exe'
$lldbcmd = $lldbPath
$lldbargs = @('--batch', '--one-line', 'run', '--one-line-on-crash', '"frame variable"', '--one-line-on-crash', '"register read"', '--one-line-on-crash', '"bt all"', '--one-line-on-crash', '"quit 1"', '--')

& $outDir\ponyc.exe --debug --bin-name=ubench --output=$outDir test\rt-stress\string-message-ubench
Expand All @@ -468,7 +469,7 @@ switch ($Command.ToLower())
}
"stress-test-with-cd-debug"
{
$lldbcmd = 'C:\msys64\mingw64\bin\lldb.exe'
$lldbcmd = $lldbPath
$lldbargs = @('--batch', '--one-line', 'run', '--one-line-on-crash', '"frame variable"', '--one-line-on-crash', '"register read"', '--one-line-on-crash', '"bt all"', '--one-line-on-crash', '"quit 1"', '--')

& $outDir\ponyc.exe --debug --bin-name=ubench --output=$outDir test\rt-stress\string-message-ubench
Expand Down

0 comments on commit 2d84c8c

Please sign in to comment.