Improved swig bindings #105
This file contains hidden or 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
| ###### DESCRIPTION | |
| # | |
| # | |
| # This workflow builds and test the la library project for the following platform and config : | |
| # -- Ubuntu-22.04 (x86) [release & debug] | |
| # -- Ubuntu-22.04 (arm) [release & debug] | |
| # | |
| # This workflow is triggered on push to `dev` and `main` branches or on workflow_call | |
| # The swig workflow to fetch the swig binaries is called and must execute successfully to continue | |
| # | |
| # | |
| name: Linux | |
| on: | |
| push: | |
| branches: [ dev, main ] | |
| workflow_call: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| checks: write | |
| packages: write | |
| 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: | |
| linux-build-and-test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: ["release","debug"] | |
| os: ["ubuntu-22.04","ubuntu-22.04-arm"] | |
| runs-on: ${{matrix.os}} | |
| 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}} -c Ninja -build-csharp -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 test | |
| # 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}} --target all | |