build(cmake): streamline cmake script #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Linux | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
concurrency: | |
group: environment-lin-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build - ${{ matrix.config.os }} | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- os: ubuntu-22.04 | |
name: "Ubuntu GCC-11" | |
artifact: "ubuntu_gcc.7z" | |
build_type: "RelWithDebInfo" | |
cc: "clang-14" | |
cxx: "clang++-14" | |
archiver: "7z a" | |
generators: "Unix Makefiles" | |
build_dir: 'build' | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Setup Pragma Module | |
id: pragma-cmake-defs | |
uses: Silverlan/common_actions/setup_pragma_module@main | |
with: | |
cc_version: ${{ matrix.cc }} | |
cxx_version: ${{ matrix.cxx }} | |
- name: Build | |
shell: bash | |
run: | | |
cmake -G "Unix Makefiles" \ | |
${{ steps.pragma-cmake-defs.outputs.cmake_defs }} \ | |
-DDEPENDENCY_XATLAS_INCLUDE="./third_party/xatlas/source/xatlas/" \ | |
-DDEPENDENCY_SHARED_INCLUDE="./pragma/core/shared/include/" | |
cmake --build ./ --verbose --target pr_xatlas | |
- name: Create Release Files | |
shell: bash | |
run: | | |
mkdir release | |
mkdir release/modules | |
rsync --mkpath ./libpr_xatlas.so release/modules/ | |
- name: Release Binaries | |
uses: Silverlan/common_actions/release_nightly_binaries@main | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit: ${{ github.ref_name }} |