Run tests under C++ and fix bugs found as a result #299
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: Build | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: System Dependencies | |
| run: | | |
| sudo sh -c 'echo deb https://www.deb-multimedia.org sid main non-free > /etc/apt/sources.list.d/dm.list' | |
| sudo apt-get update -oAcquire::AllowInsecureRepositories=true | |
| sudo apt-get install --allow-unauthenticated deb-multimedia-keyring | |
| sudo apt-get update | |
| sudo apt-get install -y haxe libstrophe-dev libopus-dev libdatachannel-dev libpcre2-dev libmbedtls-dev libsqlite3-dev | |
| haxelib setup ~/haxe | |
| - name: Cache haxelib | |
| id: cache-npm | |
| uses: actions/cache@v3 | |
| env: | |
| cache-name: cache-haxelib | |
| with: | |
| path: ~/haxe | |
| key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/build.yml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-build-${{ env.cache-name }}- | |
| ${{ runner.os }}-build- | |
| ${{ runner.os }}- | |
| - name: Haxe Dependencies | |
| run: | | |
| make hx-build-dep | |
| - name: NPM Dependencies | |
| run: | | |
| cd npm | |
| npm config set maxsockets 2 | |
| npm i | |
| - name: Tests | |
| run: make test | |
| - name: Build | |
| run: | | |
| make -j$(nproc) | |
| cd cpp && make clean | |
| - name: libborogove Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: libborogove | |
| path: | | |
| libborogove.so | |
| libborogove.a | |
| libborogove.batteriesincluded.so | |
| cpp/borogove.h | |
| - name: cpp Tarball | |
| run: tar -cjf cpp.tar.gz cpp/ | |
| - name: cpp Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cpp | |
| path: | | |
| cpp.tar.gz | |
| - name: NPM Tarball | |
| run: tar -cjf npm.tar.gz npm/ | |
| - name: JS Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: npm.tar.gz | |
| path: | | |
| npm.tar.gz |