Implement Github Actions CI

This commit is contained in:
Niklas Larsson 2020-05-21 19:25:08 +02:00
parent 83b749e4f2
commit 63e2c2819f
2 changed files with 43 additions and 3 deletions

40
.github/workflows/ci-windows.yml vendored Normal file
View File

@ -0,0 +1,40 @@
name: Idris 2 CI
on:
push:
branches:
- '*'
tags:
- '*'
pull_request:
branches:
- master
env:
MSYS2_PATH_TYPE: inherit
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install MSYS2
uses: eine/setup-msys2@v0
with:
update: true
install: make mingw-w64-x86_64-clang tar
- name: Get Chez Scheme
run: |
git clone --depth 1 https://github.com/cisco/ChezScheme
- name: Configure and Build Chez Scheme
run: msys2do cd ChezScheme; ./configure --threads; make; cd ..
shell: cmd
- name: Set Path
run: |
$chez="$(pwd)\ChezScheme\ta6nt\bin\ta6nt"
echo "::add-path::$chez"
echo "::set-env name=SCHEME::scheme"
- name: Test Scheme
run: scheme.exe --version
- name: Bootstrap
run: msys2do make bootstrap
shell: cmd

View File

@ -329,10 +329,10 @@ startChezCmd chez appdir target = unlines
startChezWinSh : String -> String -> String -> String
startChezWinSh chez appdir target = unlines
[ "#!/bin/sh"
, "DIR=\"`realpath $0`\""
, "DIR=\"`realpath \"$0\"`\""
, "CHEZ=$(cygpath \"" ++ chez ++"\")"
, "export PATH=\"`dirname \"$DIR\"`/\"" ++ appdir ++ "\":$PATH\""
, "$CHEZ --script \"`dirname \"$DIR\"`\"/\"" ++ target ++ "\" \"$@\""
, "\"$CHEZ\" --script \"$(dirname \"$DIR\")/" ++ target ++ "\" \"$@\""
]
||| Compile a TT expression to Chez Scheme
@ -374,7 +374,7 @@ compileToSO chez appDirRel outSsAbs
Right () <- coreLift $ writeFile tmpFileAbs build
| Left err => throw (FileErr tmpFileAbs err)
coreLift $ chmodRaw tmpFileAbs 0o755
coreLift $ system (chez ++ " --script " ++ tmpFileAbs)
coreLift $ system ("\"" ++ chez ++ "\" --script \"" ++ tmpFileAbs ++ "\"")
pure ()
makeSh : String -> String -> String -> Core ()