Skip to content

Ensure that dmlab2d can still build wheels #197

Ensure that dmlab2d can still build wheels

Ensure that dmlab2d can still build wheels #197

Workflow file for this run

# A workflow to run Bazel builds and tests.
name: precommit
on:
workflow_dispatch:
pull_request:
push:
branches:
- 'main'
- 'beta'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
name: Build+test ${{ matrix.cfg.name }}
runs-on: ${{ matrix.cfg.os }}
timeout-minutes: 30
strategy:
fail-fast: ${{ github.event_name != 'workflow_dispatch' }}
matrix:
cfg:
- { name: 'Linux GCC', os: 'ubuntu-22.04', cc: gcc-12, cxx: g++-12, config: }
- { name: 'Linux LLVM+libstdc++', os: 'ubuntu-22.04', cc: clang, cxx: clang++, config: --linkopt=-fuse-ld=lld }
- { name: 'Linux LLVM+libc++', os: 'ubuntu-22.04', cc: clang, cxx: clang++, config: --config=libc++ --linkopt=-fuse-ld=lld }
- { name: 'MacOS 13 x86_64 LLVM+libc++', os: 'macos-13', cc: clang, cxx: clang++, config: --config=libc++ --config=macos }
- { name: 'MacOS 13 ARM64 LLVM+libc++', os: 'macos-13', cc: clang, cxx: clang++, config: --config=libc++ --config=macos_arm64 }
- { name: 'MacOS 14 ARM64 LLVM+libc++', os: 'macos-14', cc: clang, cxx: clang++, config: --config=libc++ --config=macos_arm64 }
python-version:
- '3.10'
env:
CC: ${{ matrix.cfg.cc }}
CXX: ${{ matrix.cfg.cxx }}
steps:
- uses: actions/checkout@v3
- name: install infrastructure (Linux)
if: startsWith( matrix.cfg.os, 'ubuntu-' )
run: |
sudo ln -s /usr/lib/llvm-10/include/c++/v1 /usr/include/c++/v1
- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: |
pip3 install numpy packaging
which python3
python3 --version
pip3 list
bazel --version
- name: build-lua5.1
run: |
bazel --bazelrc=.bazelrc build --config=lua5_1 ${{ matrix.config }} //...
- name: test-lua5.1
if: matrix.cfg.os != 'macos-13' && matrix.cfg.config != 'macos_arm64'
run: |
bazel --bazelrc=.bazelrc test --config=lua5_1 ${{ matrix.config }} --test_output=errors //...
- name: build-lua5.2
run: |
bazel --bazelrc=.bazelrc build --config=lua5_2 ${{ matrix.config }} //...
- name: test-lua5.2
if: matrix.cfg.os != 'macos-13' && matrix.cfg.config != 'macos_arm64'
run: |
bazel --bazelrc=.bazelrc test --config=lua5_2 ${{ matrix.config }} --test_output=errors //...
- name: build-luajit
run: |
bazel --bazelrc=.bazelrc build --config=luajit ${{ matrix.config }} //...
- name: test-luajit
if: matrix.cfg.os != 'macos-13' && matrix.cfg.config != 'macos_arm64'
run: |
bazel --bazelrc=.bazelrc test --config=luajit ${{ matrix.config }} --test_output=errors //...
- name: build-luajit-internal_unwind
run: |
bazel --bazelrc=.bazelrc build --config=luajit ${{ matrix.config }} --copt=-fno-asynchronous-unwind-tables --luajit_external_unwinder=False //...
- name: test-luajit-internal_unwind
if: matrix.cfg.os != 'macos-13' && matrix.cfg.config != 'macos_arm64'
run: |
bazel --bazelrc=.bazelrc test --config=luajit ${{ matrix.config }} --copt=-fno-asynchronous-unwind-tables --luajit_external_unwinder=False --test_output=errors //...