Skip to content

Linux action runner #11

Linux action runner

Linux action runner #11

name: CMake on Linux
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Initialize submodules
run: git submodule update --init --recursive
- name: Install Wasmer
run: curl https://get.wasmer.io -sSfL | WASMER_DIR=lib/wasmer sh
- name: Upload Wasmer as artifact
uses: actions/upload-artifact@v4
with:
name: wasmer
path: ${{ github.workspace }}/lib/wasmer
- name: Cache CMake build
uses: actions/cache@v3
with:
path: build
key: ${{ runner.os }}-build-${{ github.sha }}
restore-keys: |
${{ runner.os }}-build-
- name: Cache CMake dependencies
uses: actions/cache@v3
with:
path: |
.cache
key: ${{ runner.os }}-cmake-${{ github.sha }}
restore-keys: |
${{ runner.os }}-cmake-
- name: Build project
working-directory: ${{ github.workspace }}
run: ./build.sh
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build
path: ${{ github.workspace }}/build
lexer-test:
runs-on: macos-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build
path: ${{ github.workspace }}/build
- name: Download Wasmer artifacts
uses: actions/download-artifact@v4
with:
name: wasmer
path: ${{ github.workspace }}/lib/wasmer
- name: Make LexerTest Executable
run: chmod +x ${{ github.workspace }}/build/LexerTest
- name: Output LexerText directory
run: file ${{ github.workspace }}/build/LexerTest
- name: Run Lexer Test
working-directory: ${{ github.workspace }}/build
run: ./LexerTest
parser-test:
runs-on: macos-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build
path: ${{ github.workspace }}/build
- name: Download Wasmer artifacts
uses: actions/download-artifact@v4
with:
name: wasmer
path: ${{ github.workspace }}/lib/wasmer
- name: Make ParserTest Executable
run: chmod +x ${{ github.workspace }}/build/ParserTest
- name: Run Parser Test
working-directory: ${{ github.workspace }}/build
run: ./ParserTest
typechecker-test:
runs-on: macos-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build
path: ${{ github.workspace }}/build
- name: Download Wasmer artifacts
uses: actions/download-artifact@v4
with:
name: wasmer
path: ${{ github.workspace }}/lib/wasmer
- name: Make TypeCheckerTest Executable
run: chmod +x ${{ github.workspace }}/build/TypeCheckerTest
- name: Run TypeChecker Test
working-directory: ${{ github.workspace }}/build
run: ./TypeCheckerTest
codegen-test:
runs-on: macos-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build
path: ${{ github.workspace }}/build
- name: Download Wasmer artifacts
uses: actions/download-artifact@v4
with:
name: wasmer
path: ${{ github.workspace }}/lib/wasmer
- name: Make CodegenTest Executable
run: chmod +x ${{ github.workspace }}/build/CodegenTest
- name: Run Codegen Test
working-directory: ${{ github.workspace }}/build
run: ./CodegenTest