Setup preliminary CI for tests (#71) #1
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: Build and run tests | |
on: [push, pull_request] | |
jobs: | |
tests: | |
runs-on: windows-latest | |
steps: | |
- name: сheckout | |
uses: actions/checkout@main | |
- name: make dir | |
run: md build | |
- name: download mplc | |
run: curl -LSs -o build/mplc.exe https://github.com/Matway/mpl-c/releases/latest/download/mplc.exe | |
- name: clone sl | |
run: git clone --depth 1 --single-branch https://github.com/Matway/mpl-sl.git sl | |
- name: mplc | |
run: ./build/mplc.exe ./.github/workflows/test.mpl -I ./ -I ./test -I ./windows -o ./build/test.ll -ndebug -D DEBUG=TRUE -linker_option /DEFAULTLIB:"ws2_32.lib" | |
- name: clang | |
run: clang ./build/test.ll -O0 -o ./build/test.exe | |
- name: test | |
run: ./build/test.exe | |
- name: artifacts | |
uses: actions/upload-artifact@main | |
with: | |
name: tests | |
path: | | |
build/*.exe | |
build/*.ll |