Crystal CI #107
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Crystal CI | |
on: | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: 'Log level' | |
required: true | |
default: 'warning' | |
type: choice | |
options: | |
- info | |
- warning | |
- debug | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Install Crystal 1.15.0 | |
shell: pwsh | |
run: | | |
(New-Object Net.WebClient).DownloadFile("https://github.com/crystal-lang/crystal/releases/download/1.15.0/crystal-1.15.0-windows-x86_64-msvc-unsupported.exe", "$PWD\crystal-1.15.0-windows-x86_64-msvc-unsupported.exe") | |
$code = Start-Process .\crystal-1.15.0-windows-x86_64-msvc-unsupported.exe -Wait -ArgumentList "/VERYSILENT","/SP-","/SUPPRESSMSGBOXES","/LOG=$PWD\OUTPUT.LOG" -Verb RunAs | |
dir $env:LOCALAPPDATA\Programs\Crystal | |
- name: crystal version | |
shell: pwsh | |
run: | | |
& "$env:LOCALAPPDATA\Programs\Crystal\crystal.exe" version | |
- uses: actions/checkout@v4 | |
- name: Create json directory | |
shell: pwsh | |
run: | | |
mkdir json | |
- uses: actions/checkout@v4 | |
with: | |
repository: marlersoft/win32json | |
path: json/win32json | |
- name: Install dependencies | |
shell: pwsh | |
run: | | |
& "$env:LOCALAPPDATA\Programs\Crystal\shards.exe" install | |
- name: List bin dir | |
shell: pwsh | |
run: | | |
dir .\bin | |
- name: Cleanup src directory | |
shell: pwsh | |
run: | | |
if (Test-Path -Path .\src\win32cr) { Remove-Item -Path src/win32cr -Force -Recurse } | |
- name: WinMD version | |
shell: cmd | |
run: | | |
dir | |
dir bin | |
bin\winmd.exe | |
bin\winmd.exe --version | |
- name: Generate bindings | |
shell: pwsh | |
run: | | |
& .\bin\winmd.exe generate -d json\win32json\api . | |
- name: Run tests | |
shell: pwsh | |
run: | | |
& "$env:LOCALAPPDATA\Programs\Crystal\crystal.exe" spec --error-trace --debug |