Skip to content

Change -DOPENMIND_BUILD_TESTS=OFF to -DOPENMIND_BUILD_TESTS=NO for Wi… #44

Change -DOPENMIND_BUILD_TESTS=OFF to -DOPENMIND_BUILD_TESTS=NO for Wi…

Change -DOPENMIND_BUILD_TESTS=OFF to -DOPENMIND_BUILD_TESTS=NO for Wi… #44

Workflow file for this run

name: Vcpkg CI
on: [push]
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
config: [Release]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Cache vcpkg
uses: actions/cache@v4
with:
path: |
${{github.workspace}}/vcpkg
!${{github.workspace}}/vcpkg/buildtrees
!${{github.workspace}}/vcpkg/packages
!${{github.workspace}}/vcpkg/downloads
${{ github.workspace }}/build/bin/Db*.solutions
key: ${{ runner.os }}-vcpkg-${{ hashFiles('**/vcpkg.json') }}
restore-keys: |
${{ runner.os }}-vcpkg-
- name: Install dependencies (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake ninja-build autoconf automake autoconf-archive
cmake --version
ninja --version
gcc --version
g++ --version
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
env:
VCPKG_PYTHON3: $(which python3)
run: |
echo "VCPKG_PYTHON3=$VCPKG_PYTHON3" >> $GITHUB_ENV
brew update
brew install cmake ninja autoconf automake autoconf-archive
cmake --version
ninja --version
clang --version
- name: Install dependencies (Windows)
if: runner.os == 'Windows'
uses: microsoft/setup-msbuild@v2
- name: Set Windows vcpkg triplet
if: runner.os == 'Windows'
run: echo "VCPKG_TARGET_TRIPLET_CMAKE_PARAM=-DVCPKG_TARGET_TRIPLET=x64-windows" >> $env:GITHUB_ENV
- name: Setup MSVC
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 'c82f74667287d3dc386bce81e44964370c91a289'
vcpkgJsonGlob: '**/vcpkg.json'
- name: Configure CMake (non-Windows)
if: runner.os != 'Windows'
run: cmake -B ${{github.workspace}}/build -G "Ninja Multi-Config" -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/vcpkg/scripts/buildsystems/vcpkg.cmake ${{ env.VCPKG_TARGET_TRIPLET_CMAKE_PARAM }} -DOPENMIND_BUILD_TESTS=ON -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install
- name: Configure CMake (Windows)
if: runner.os == 'Windows'
run: cmake -B ${{github.workspace}}/build -G "Ninja Multi-Config" -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/vcpkg/scripts/buildsystems/vcpkg.cmake ${{ env.VCPKG_TARGET_TRIPLET_CMAKE_PARAM }} -DOPENMIND_BUILD_TESTS=NO -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{ matrix.config }}
- name: Install
run: cmake --install ${{github.workspace}}/build --config ${{ matrix.config }} --prefix ${{github.workspace}}/install
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v2
id: cpu-cores
- name: Check (non-Windows)
if: runner.os != 'Windows'
working-directory: ${{github.workspace}}/build
run: ctest . -C ${{ matrix.config }} -j ${{steps.cpu-cores.outputs.count}} --test-dir libskrypt --rerun-failed --output-on-failure
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: skrypt-vcpkg-${{ runner.os }}-${{ matrix.config }}
path: |
${{github.workspace}}/build/bin
${{github.workspace}}/build/lib
${{github.workspace}}/install/bin
${{github.workspace}}/install/lib
${{github.workspace}}/build/${{ matrix.config }}/bin
${{github.workspace}}/build/${{ matrix.config }}/lib
${{github.workspace}}/install/bin/${{ matrix.config }}
${{github.workspace}}/install/lib/${{ matrix.config }}
retention-days: 7