43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
name: build & run tests
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
build-type: [Release] # Debug
|
|
lua: ["lua 5.1", "lua 5.2", "lua 5.3", "luajit 2.0"]
|
|
os: ["macos-latest", "ubuntu-latest"] # "windows-latest"
|
|
include:
|
|
- os: macos-latest
|
|
macos_build_target: 10.0
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: recursive
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.8'
|
|
- name: Setup env
|
|
env:
|
|
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos_build_target }}
|
|
run: |
|
|
pip install hererocks
|
|
hererocks lua-pkg --${{ matrix.lua }} -rlatest
|
|
- name: Configure CMake
|
|
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build-type}} -DLUA_INCLUDE_DIR="${{github.workspace}}/lua-pkg/include"
|
|
- name: Build
|
|
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build-type}}
|
|
- name: Test
|
|
working-directory: ${{github.workspace}}/build
|
|
run: |
|
|
source ${{github.workspace}}/lua-pkg/bin/activate
|
|
STRESS=1 lua ../tests/lua/run_tests
|