From 96cfd7ed070ac4f025f5373b7f5756f839721aae Mon Sep 17 00:00:00 2001 From: mihacooper Date: Mon, 24 Jan 2022 11:25:47 +0300 Subject: [PATCH] Enable github actions (#166) Enable github actions (linux + macos) --- .github/workflows/cmake.yml | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/cmake.yml diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml new file mode 100644 index 0000000..f96db45 --- /dev/null +++ b/.github/workflows/cmake.yml @@ -0,0 +1,42 @@ +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