cmake: add option BUILD_TIFILEUTIL (by default ON) #165
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: [ master, experimental, experimental2 ] | |
pull_request: | |
branches: [ master, experimental, experimental2 ] | |
release: | |
types: [published] | |
jobs: | |
build: | |
name: "Build: ${{ matrix.arch }} ${{ matrix.os }} - ${{ matrix.upload_suffix }}" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-20.04] | |
arch: [x64] | |
config: [Release] | |
statictype: [ON, OFF] | |
include: | |
- statictype: ON | |
preset_suffix: "" | |
upload_suffix: static | |
- statictype: OFF | |
preset_suffix: "-Dynamic" | |
upload_suffix: shared | |
steps: | |
- name: Checkout Git Repo | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: workaround for default apt mirror connectivity issues | |
run: | | |
sudo sed -i 's/azure\.//' /etc/apt/sources.list | |
- name: Install dependencies | |
run: sudo apt install -y libudev-dev | |
- name: Install latest CMake | |
uses: lukka/get-cmake@a70f1cfa1857a3eecfe0d34962269e1b1e8be56c # latest as of 2024-08-08 | |
- name: Restore artifacts, or setup vcpkg (do not install any package) | |
uses: lukka/run-vcpkg@d87e7fac99f22776a4973d7e413921ea254c1fc9 # latest as of 2024-08-08 | |
- name: create install folder | |
run: | | |
mkdir -p "${{ github.workspace }}/tilibs.build/Linux-${{ matrix.arch }}/prefix" | |
- name: Build and install tilibs ${{ matrix.config }} on Linux ${{ matrix.arch }} | |
uses: lukka/run-cmake@4b1adc1944be8367be9f4e08303ce49918db8e3c # latest as of 2024-08-08 | |
with: | |
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt' | |
configurePreset: 'Linux-${{ matrix.arch }}${{ matrix.preset_suffix }}' | |
configurePresetAdditionalArgs: "['-DDEPS_RELEASE_ONLY=ON']" | |
buildPreset: 'Linux-${{ matrix.arch }}${{ matrix.preset_suffix }}-${{ matrix.config }}' | |
buildPresetAdditionalArgs: "['--target', 'check', 'install']" | |
env: | |
CMAKE_INSTALL_PREFIX_OVERRIDE: ${{ github.workspace }}/tilibs.build/Linux-${{ matrix.arch }}/prefix | |
VCPKG_DEFAULT_HOST_TRIPLET: ${{ matrix.arch }}-linux-release | |
VCPKG_FORCE_SYSTEM_BINARIES: 1 | |
- name: Upload install folder | |
uses: actions/upload-artifact@v4 | |
with: | |
name: tilibs_${{ matrix.os }}-${{ matrix.arch }}_${{ matrix.upload_suffix }}Deps | |
path: ${{ github.workspace }}/tilibs.build/Linux-${{ matrix.arch }}/prefix |