Crystal Latest CI #566
This file contains hidden or 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 Latest CI | |
on: | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: 'Log level' | |
required: true | |
default: 'warning' | |
type: choice | |
options: | |
- info | |
- warning | |
- debug | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
build: | |
runs-on: windows-2019 | |
steps: | |
- name: Install Latest Crystal | |
shell: pwsh | |
run: | | |
$release = gh release view --repo crystal-lang/crystal --json tagName|ConvertFrom-Json | |
gh release download -R crystal-lang/crystal -p "*.exe" -O crystal-installer.exe --clobber $release.tagName | |
$code = Start-Process .\crystal-installer.exe -Wait -ArgumentList "/VERYSILENT","/SP-","/SUPPRESSMSGBOXES","/LOG=$PWD\OUTPUT.LOG" -Verb RunAs | |
dir $env:LOCALAPPDATA\Programs\Crystal | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- 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: Cleanup src directory | |
shell: pwsh | |
run: | | |
if (Test-Path -Path .\src\win32cr) { Remove-Item -Path src/win32cr -Force -Recurse } | |
- name: Build WinMD | |
shell: pwsh | |
run: | | |
echo $pwd | |
& .\scripts\build_winmd.ps1 | |
- name: WinMD version | |
shell: cmd | |
run: | | |
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 |