Provide wasm using clang or emscripten 2 make decoding runnable in a browser #310
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
| name: ubuntu24-clang16 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| # types: [opened, reopened, ready_for_review] | |
| branches: [main] | |
| schedule: | |
| - cron: "23 3 2,12,22 * *" | |
| env: | |
| CLANG_VERSION: 16 | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-24.04] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install build environment and setup tooling | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install --no-install-recommends -y clang-$CLANG_VERSION libc++-$CLANG_VERSION-dev libc++abi-$CLANG_VERSION-dev lld-$CLANG_VERSION libgtk2.0-dev python3-dev | |
| sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-$CLANG_VERSION 800 | |
| sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/clang++-$CLANG_VERSION 800 | |
| sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-$CLANG_VERSION 800 | |
| sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-$CLANG_VERSION 800 | |
| sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/clang-$CLANG_VERSION 800 | |
| sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-$CLANG_VERSION 800 | |
| sudo update-alternatives --install /usr/bin/ld.lld lld /usr/bin/ld.lld-$CLANG_VERSION 800 | |
| sudo update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-$CLANG_VERSION 800 | |
| etc/install-ubuntu-dependencies.sh | |
| python3 -m venv venv | |
| - name: Setup conan | |
| run: | | |
| . venv/bin/activate | |
| pip install -r requirements.txt | |
| etc/conan-config.sh clang $CLANG_VERSION | |
| - name: Cache/Restore dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.conan2 | |
| key: ${{ runner.arch }}-${{ github.workflow }}-conanfile-${{ hashFiles('**/conanfile.py') }} | |
| - name: Install dependencies | |
| run: | | |
| . venv/bin/activate | |
| etc/conan-install.sh Release -pr:a="./etc/conan/profiles/ubuntu24" -pr:a="./etc/conan/profiles/clang$CLANG_VERSION" | |
| - name: Build | |
| run: | | |
| . venv/bin/activate | |
| etc/cmake-config.sh Release | |
| etc/cmake-build.sh Release | |
| - name: Unit-Test C++ | |
| run: | | |
| cert/install-uic-keys.sh | |
| build/Release/bin/ticket-decoder-test | |
| - name: Unit-Test Python3 | |
| run: | | |
| . venv/bin/activate | |
| etc/python-test.sh | |
| - name: Archive artifacts | |
| if: github.ref_name == 'main' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ticket-decoder-${{ runner.arch }}-${{ github.workflow }} | |
| path: | | |
| build/Release/etc/* | |
| build/Release/lib/* | |
| build/Release/bin/* |