Skip to content

Improved swig bindings #86

Improved swig bindings

Improved swig bindings #86

Workflow file for this run

name: Windows
on:
push:
branches: [ dev, main ]
workflow_call:
env:
NUGET_FEED_USENAME: github
NUGET_FEED_URL: https://nuget.pkg.github.com/${{github.repository_owner}}/index.json
lib_name: la_networkInterfaceHelper
build_dir: _build
GITHUB_TOKEN: ${{secrets.NUGET_PAT}}
jobs:
windows-build-and-test:
strategy:
fail-fast: false
matrix:
config: ["release","debug"]
os: ["windows-2022"]
runs-on: ${{matrix.os}}
env:
LC_ALL: en_US.UTF-8
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: L-Acoustics/la-mw-gh-action/.github/actions/la-swig@v0
name: Install custom SWIG
id: la_swig
- name: Configure runner
uses: L-Acoustics/la-mw-gh-action/.github/actions/la-configure-runner@v0
- name: Configure CMake
shell: bash
run: |
echo "Generating CMake for config: ${{matrix.config}}"
arch=$([ ${{runner.arch}} = "X64" ] && echo "x64" || echo "arm64")
./gen_cmake.sh -o ${{env.build_dir}} -${{matrix.config}} -build-csharp -c Ninja -arch $arch -- \
"-DNUGET_PUBLISH_SOURCE_URL=${{env.NUGET_FEED_URL}}" \
"-DSWIG_DIR=${{steps.la_swig.outputs.swig_dir}}" \
"-DCU_REPO_URL=https://github.com/${{github.repository}}" \
"-DSWIG_EXECUTABLE=${{steps.la_swig.outputs.swig_exec}}"
- name: Build tests
# Build your program with the given configuration
run: cmake --build ${{env.build_dir}} --target Tests
- name: Test
working-directory: ${{github.workspace}}/${{env.build_dir}}/tests/src
shell: bash
run: |
test_cmd="./Tests --gtest_filter=-MANUAL*"
if [ "${{matrix.config}}" = "debug" ]; then
test_cmd="./Tests-d --gtest_filter=-MANUAL*"
fi
eval $test_cmd
- name: Build all
# Build your program with the given configuration
run: cmake --build ${{env.build_dir}}