This pull request enables Bazel build support for cpptrace. Please note that currently, only Linux is supported. Additional platform support will be added if necessary.
146 lines
3.7 KiB
YAML
146 lines
3.7 KiB
YAML
name: build
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
build-linux:
|
|
runs-on: ubuntu-22.04
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
compiler: [gcc, clang]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: dependencies
|
|
run: |
|
|
sudo apt install gcc-10 g++-10 libgcc-10-dev libunwind8-dev ninja-build
|
|
pip3 install colorama
|
|
- name: libdwarf
|
|
run: |
|
|
cd ..
|
|
cpptrace/ci/setup-prerequisites.sh
|
|
- name: build
|
|
run: |
|
|
python3 ci/build-in-all-configs.py --${{matrix.compiler}} --default-config
|
|
build-linux-bazel:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: dependencies
|
|
run: |
|
|
sudo apt install -y libtool libncurses5
|
|
- name: bazel build opt
|
|
run: |
|
|
bazel build //... -c opt
|
|
- name: bazel build dbg
|
|
run: |
|
|
bazel build //... -c dbg
|
|
build-macos:
|
|
runs-on: macos-14
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
compiler: [gcc, clang]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: dependencies
|
|
run: |
|
|
brew install ninja
|
|
python3 -m venv env
|
|
env/bin/pip install colorama
|
|
- name: libdwarf
|
|
run: |
|
|
cd ..
|
|
cpptrace/ci/setup-prerequisites.sh
|
|
- name: build
|
|
run: |
|
|
env/bin/python ci/build-in-all-configs.py --${{matrix.compiler}} --default-config
|
|
build-windows:
|
|
runs-on: windows-2022
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
compiler: [msvc, clang, gcc]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Enable Developer Command Prompt
|
|
uses: ilammy/msvc-dev-cmd@v1.13.0
|
|
- name: dependencies
|
|
run: |
|
|
pip3 install colorama
|
|
- name: libdwarf
|
|
run: |
|
|
if("${{matrix.compiler}}" -eq "gcc") {
|
|
cd ..
|
|
cpptrace/ci/setup-prerequisites-mingw.ps1
|
|
}
|
|
- name: build
|
|
run: |
|
|
python3 ci/build-in-all-configs.py --${{matrix.compiler}} --default-config
|
|
build-linux-all-configurations:
|
|
runs-on: ubuntu-22.04
|
|
needs: build-linux
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
compiler: [gcc, clang]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: dependencies
|
|
run: |
|
|
sudo apt install gcc-10 g++-10 libgcc-10-dev libunwind8-dev ninja-build
|
|
pip3 install colorama
|
|
- name: libdwarf
|
|
run: |
|
|
cd ..
|
|
cpptrace/ci/setup-prerequisites.sh
|
|
- name: build
|
|
run: |
|
|
python3 ci/build-in-all-configs.py --${{matrix.compiler}}
|
|
build-macos-all-configurations:
|
|
runs-on: macos-14
|
|
needs: build-macos
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
compiler: [gcc, clang]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: dependencies
|
|
run: |
|
|
brew install ninja
|
|
python3 -m venv env
|
|
env/bin/pip install colorama
|
|
- name: libdwarf
|
|
run: |
|
|
cd ..
|
|
cpptrace/ci/setup-prerequisites.sh
|
|
- name: build
|
|
run: |
|
|
env/bin/python ci/build-in-all-configs.py --${{matrix.compiler}}
|
|
build-windows-all-configurations:
|
|
runs-on: windows-2022
|
|
needs: build-windows
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
compiler: [msvc, clang, gcc]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Enable Developer Command Prompt
|
|
uses: ilammy/msvc-dev-cmd@v1.13.0
|
|
- name: dependencies
|
|
run: |
|
|
pip3 install colorama
|
|
- name: libdwarf
|
|
run: |
|
|
if("${{matrix.compiler}}" -eq "gcc") {
|
|
cd ..
|
|
cpptrace/ci/setup-prerequisites-mingw.ps1
|
|
}
|
|
- name: build
|
|
run: |
|
|
python3 ci/build-in-all-configs.py --${{matrix.compiler}}
|