Change type of CSyntax.Let #358
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
on: [push, pull_request] | |
name: ci | |
jobs: | |
build-and-test: | |
name: build-and-test | |
runs-on: ubuntu-20.04 # 22.04 doesn't contain mlton | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install mlton luajit | |
# ubuntu-20.04 has Lua 5.3.3 as lua5.3, which is buggy. | |
- name: Cache Lua 5.3 binary | |
id: cache-lua53 | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-lua5.3.6 | |
with: | |
path: ~/.local/bin | |
key: ${{ runner.os }}-build-${{ env.cache-name }} | |
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }} | |
- if: ${{ steps.cache-lua53.outputs.cache-hit != 'true' }} | |
name: Build Lua 5.3.6 | |
run: | | |
curl -LO https://www.lua.org/ftp/lua-5.3.6.tar.gz | |
tar xf lua-5.3.6.tar.gz | |
cd lua-5.3.6 | |
make -j linux | |
mkdir -p ~/.local/bin | |
cp src/lua ~/.local/bin/ | |
cp src/luac ~/.local/bin/ | |
- name: Build | |
run: make | |
- name: Test (Lua) | |
run: make test-lua | |
- name: Test (LuaJIT) | |
run: make test-luajit | |
env: | |
LUA_INIT_5_3: "" | |
# LuaJIT: Workaround https://github.com/LuaJIT/LuaJIT/issues/859 | |
LUA_INIT: "local c=math.ceil;math.ceil=function(x)if-1<x and x<0 then return 0/(-1)else return c(x)end end" | |
- name: Test (JS) | |
run: make test-nodejs | |
- name: Test (JS-CPS) | |
run: make test-nodejs-cps | |
- name: Test (Lua-continuations) | |
run: make test-lua-continuations | |
- name: Prepare third-party libraries | |
run: make -C thirdparty install | |
- name: Compile myself (Lua) | |
run: | | |
bin/lunarml compile -o lunarml.lua --default-ann "valDescInComments error" src/lunarml-main.mlb | |
luac -p lunarml.lua | |
- name: Compile myself (LuaJIT) | |
run: | | |
bin/lunarml compile --luajit -o lunarml-luajit.lua --default-ann "valDescInComments error" src/lunarml-main.mlb | |
luajit -bl lunarml-luajit.lua > /dev/null | |
- name: Compile myself and validate (JavaScript) | |
run: make validate-js | |
env: | |
NODE_OPTIONS: "--max-old-space-size=4096" | |
- name: Archive | |
run: make archive | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: archive | |
path: | | |
lunarml-*.tar.gz | |
lunarml-*.zip |