Updated build scripts and README.md #127
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 | |
- 'development/**' | |
pull_request: | |
branches: | |
- master | |
- 'development/**' | |
types: [opened, reopened, ready_for_review, review_requested] | |
jobs: | |
build: | |
runs-on: windows-2019 | |
steps: | |
- name: crystal version | |
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","/CURRENTUSER","/SP-","/SUPPRESSMSGBOXES","/LOG=$PWD\OUTPUT.LOG" -Verb RunAs | |
& "$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 |