mirror of
https://github.com/idris-lang/Idris2.git
synced 2025-01-07 00:07:19 +03:00
Also adding a CI target testing the gambit backend.
This commit is contained in:
parent
1d23c7a6bd
commit
301324b9b3
90
.github/workflows/ci-macos-combined.yml
vendored
Normal file
90
.github/workflows/ci-macos-combined.yml
vendored
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
name: macOS Combined Chez
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
env:
|
||||||
|
SCHEME: chez
|
||||||
|
IDRIS2_TESTS_CG: chez
|
||||||
|
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
# Building the executable
|
||||||
|
|
||||||
|
build-bootstrap-chez:
|
||||||
|
runs-on: macos-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Install build dependencies
|
||||||
|
run: |
|
||||||
|
brew install chezscheme
|
||||||
|
brew install coreutils
|
||||||
|
echo "::add-path::$HOME/.idris2/bin"
|
||||||
|
- name: Build Idris 2 from bootstrap
|
||||||
|
run: make bootstrap && make install
|
||||||
|
shell: bash
|
||||||
|
- name: Artifact Bootstrapped Idris2
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: installed-bootstrapped-idris2-chez
|
||||||
|
path: ~/.idris2/
|
||||||
|
|
||||||
|
# self hosting and testing
|
||||||
|
|
||||||
|
self-host-chez:
|
||||||
|
needs: build-bootstrap-chez
|
||||||
|
runs-on: macos-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Download Idris2 Artifact
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: installed-bootstrapped-idris2-chez
|
||||||
|
path: ~/.idris2/
|
||||||
|
- name: Install build dependencies
|
||||||
|
run: |
|
||||||
|
brew install chezscheme
|
||||||
|
brew install coreutils
|
||||||
|
echo "::add-path::$HOME/.idris2/bin"
|
||||||
|
chmod +x $HOME/.idris2/bin/idris2 $HOME/.idris2/bin/idris2_app/*
|
||||||
|
- name: Build self-hosted
|
||||||
|
run: make all && make install
|
||||||
|
shell: bash
|
||||||
|
- name: Test self-hosted
|
||||||
|
run: make test INTERACTIVE=''
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
# this gambit test is really slow so se run it separately
|
||||||
|
|
||||||
|
test-gambit:
|
||||||
|
needs: build-bootstrap-chez
|
||||||
|
runs-on: macos-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Download Idris2 Artifact
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: installed-bootstrapped-idris2-chez
|
||||||
|
path: ~/.idris2/
|
||||||
|
- name: Install build dependencies
|
||||||
|
run: |
|
||||||
|
brew install chezscheme
|
||||||
|
brew install coreutils
|
||||||
|
brew install gambit-scheme
|
||||||
|
CURRENTDIR=$(find /usr/local/Cellar/gambit-scheme -type l -name current)
|
||||||
|
echo "::add-path::${CURRENTDIR}/bin"
|
||||||
|
echo "::add-path::$HOME/.idris2/bin"
|
||||||
|
chmod +x $HOME/.idris2/bin/idris2 $HOME/.idris2/bin/idris2_app/*
|
||||||
|
- name: Test gambit
|
||||||
|
run: cd tests/gambit/bitops001/ && ./run idris2
|
||||||
|
shell: bash
|
36
.github/workflows/ci-macos.yml
vendored
36
.github/workflows/ci-macos.yml
vendored
@ -1,36 +0,0 @@
|
|||||||
name: macOS Chez
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- '*'
|
|
||||||
tags:
|
|
||||||
- '*'
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
env:
|
|
||||||
SCHEME: chez
|
|
||||||
IDRIS2_TESTS_CG: chez
|
|
||||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: macos-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install build dependencies
|
|
||||||
run: |
|
|
||||||
brew install chezscheme
|
|
||||||
brew install coreutils
|
|
||||||
echo "::add-path::$HOME/.idris2/bin"
|
|
||||||
- name: Build Idris 2 from bootstrap
|
|
||||||
run: make bootstrap && make install && make clean
|
|
||||||
shell: bash
|
|
||||||
- name: Build self-hosted
|
|
||||||
run: make all && make install
|
|
||||||
shell: bash
|
|
||||||
- name: Test self-hosted
|
|
||||||
run: make test INTERACTIVE=''
|
|
||||||
shell: bash
|
|
@ -412,11 +412,10 @@ compileExpr c tmpDir outputDir tm outfile
|
|||||||
|
|
||||||
executeExpr : Ref Ctxt Defs -> (tmpDir : String) -> ClosedTerm -> Core ()
|
executeExpr : Ref Ctxt Defs -> (tmpDir : String) -> ClosedTerm -> Core ()
|
||||||
executeExpr c tmpDir tm
|
executeExpr c tmpDir tm
|
||||||
= do outn <- compileExpr c tmpDir tmpDir tm "_tmpgambit"
|
= do Just sh <- compileExpr c tmpDir tmpDir tm "_tmpgambit"
|
||||||
case outn of
|
| Nothing => throw (InternalError "compileExpr returned Nothing")
|
||||||
-- TODO: on windows, should add exe extension
|
coreLift $ system sh -- TODO: on windows, should add exe extension
|
||||||
Just outn => map (const ()) $ coreLift $ system outn
|
pure ()
|
||||||
Nothing => pure ()
|
|
||||||
|
|
||||||
export
|
export
|
||||||
codegenGambit : Codegen
|
codegenGambit : Codegen
|
||||||
|
@ -189,11 +189,6 @@ racketTests = MkTestPool [Racket]
|
|||||||
, "futures001"
|
, "futures001"
|
||||||
]
|
]
|
||||||
|
|
||||||
gambitTests : TestPool
|
|
||||||
gambitTests = MkTestPool [Gambit]
|
|
||||||
[ "bitops001"
|
|
||||||
]
|
|
||||||
|
|
||||||
nodeTests : TestPool
|
nodeTests : TestPool
|
||||||
nodeTests = MkTestPool [Node]
|
nodeTests = MkTestPool [Node]
|
||||||
[ "node001", "node002", "node003", "node004", "node005", "node006"
|
[ "node001", "node002", "node003", "node004", "node005", "node006"
|
||||||
@ -241,7 +236,6 @@ main = runner
|
|||||||
, testPaths "chez" chezTests
|
, testPaths "chez" chezTests
|
||||||
, testPaths "refc" refcTests
|
, testPaths "refc" refcTests
|
||||||
, testPaths "racket" racketTests
|
, testPaths "racket" racketTests
|
||||||
, testPaths "gambit" gambitTests
|
|
||||||
, testPaths "node" nodeTests
|
, testPaths "node" nodeTests
|
||||||
, testPaths "templates" templateTests
|
, testPaths "templates" templateTests
|
||||||
] where
|
] where
|
||||||
|
@ -35,5 +35,3 @@
|
|||||||
[4294967284, 11, 10, 9, 15, 0]
|
[4294967284, 11, 10, 9, 15, 0]
|
||||||
[2147483636, 11, 10, 9, 15, 0]
|
[2147483636, 11, 10, 9, 15, 0]
|
||||||
[-2147483638, -11, -12, -9, -15, -2, 2147483637, 10, 11, 9, 0]
|
[-2147483638, -11, -12, -9, -15, -2, 2147483637, 10, 11, 9, 0]
|
||||||
1/1: Building BitOps (BitOps.idr)
|
|
||||||
Main> Main> Bye for now!
|
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
:exec main
|
|
||||||
:q
|
|
7
tests/gambit/bitops001/run
Normal file → Executable file
7
tests/gambit/bitops001/run
Normal file → Executable file
@ -1,3 +1,6 @@
|
|||||||
$1 --cg gambit --no-banner --no-color --console-width 0 BitOps.idr < input
|
$1 --cg gambit --exec main BitOps.idr > output
|
||||||
|
|
||||||
rm -rf build
|
rm -rf build
|
||||||
|
|
||||||
|
# We finish with cmp so that the test fails if the comparison fails
|
||||||
|
diff expected output
|
||||||
|
cmp expected output
|
||||||
|
Loading…
Reference in New Issue
Block a user