Skip to content

dev-bunlder

dev-bunlder #35

Workflow file for this run

name: macos
on:
pull_request:
paths:
- 'sese/**'
- 'CMakeLists.txt'
- 'vcpkg.json'
workflow_dispatch:
jobs:
test:
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v4.1.2
- name: Setup Python
uses: actions/setup-python@v5.3.0
with:
python-version: '3.11'
cache: 'pip'
- name: Setup Python Venv
run: |
python -m venv venv
source venv/bin/activate
pip install -r ${{ github.workspace }}/requirements.txt
- name: Setup Vcpkg
run: |
git clone https://github.com/microsoft/vcpkg ${{ github.workspace }}/vcpkg
vcpkg/bootstrap-vcpkg.sh -disableMetrics
- name: Restore Vcpkg Cache
id: restore-cache
uses: actions/cache/restore@v4.1.2
with:
path: ${{ github.workspace }}/vcpkg-archive
key: ${{ runner.os }}-vcpkg
- name: Configure CMake
working-directory: ${{ github.workspace }}
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/vcpkg-archive
Python3_ROOT_DIR: ${{ github.workspace }}/venv
run: >
source venv/bin/activate &&
mkdir -p vcpkg-archive &&
cmake
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake
-DSESE_BUILD_TEST=ON
-DSESE_USE_ARCHIVE=ON
-DSESE_DB_USE_MARIADB=ON
-DSESE_DB_USE_POSTGRES=ON
-DSESE_RESOURCE=ON
-Bbuild
- name: Always Save Cache
if: always() && steps.restore-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4.1.2
with:
path: ${{ github.workspace }}/vcpkg-archive
key: ${{ runner.os }}-vcpkg
- name: Build
working-directory: ${{ github.workspace }}
run: cmake --build build -- -j 2
- name: Test
working-directory: ${{ github.workspace }}
run: |
source venv/bin/activate
build/sese/test/AllTestsInMain --gtest_filter=-TestMaria*:TestPostgres*:TestSqlite* --gtest_output="xml:build/test_report.xml"
- name: Test report
if: success() || failure()
run: |
npx junit-to-ctrf ./build/test_report.xml -o ./build/ctrf-report.json
npx github-actions-ctrf ./build/ctrf-report.json