Add udp based wakeuper, set as default for nbio_mbox #52
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: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build-and-test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| opt: [none, minimal, size, speed, aggressive] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Odin | |
| uses: laytan/setup-odin@v2 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| release: dev-2026-03 | |
| - name: Build root lib | |
| shell: bash | |
| run: | | |
| if [ "${{ matrix.opt }}" = "none" ]; then | |
| odin build . -build-mode:lib -vet -strict-style -o:none -debug | |
| else | |
| odin build . -build-mode:lib -vet -strict-style -o:${{ matrix.opt }} | |
| fi | |
| - name: Build mbox lib | |
| shell: bash | |
| run: | | |
| if [ "${{ matrix.opt }}" = "none" ]; then | |
| odin build ./mbox/ -build-mode:lib -vet -strict-style -o:none -debug | |
| else | |
| odin build ./mbox/ -build-mode:lib -vet -strict-style -o:${{ matrix.opt }} | |
| fi | |
| - name: Build mpsc lib | |
| shell: bash | |
| run: | | |
| if [ "${{ matrix.opt }}" = "none" ]; then | |
| odin build ./mpsc/ -build-mode:lib -vet -strict-style -o:none -debug | |
| else | |
| odin build ./mpsc/ -build-mode:lib -vet -strict-style -o:${{ matrix.opt }} | |
| fi | |
| - name: Test mpsc | |
| shell: bash | |
| run: | | |
| if [ "${{ matrix.opt }}" = "none" ]; then | |
| odin test ./mpsc/ -vet -strict-style -disallow-do -o:none -debug | |
| else | |
| odin test ./mpsc/ -vet -strict-style -disallow-do -o:${{ matrix.opt }} | |
| fi | |
| - name: Build wakeup lib | |
| shell: bash | |
| run: | | |
| if [ "${{ matrix.opt }}" = "none" ]; then | |
| odin build ./wakeup/ -build-mode:lib -vet -strict-style -o:none -debug | |
| else | |
| odin build ./wakeup/ -build-mode:lib -vet -strict-style -o:${{ matrix.opt }} | |
| fi | |
| - name: Test wakeup | |
| shell: bash | |
| run: | | |
| if [ "${{ matrix.opt }}" = "none" ]; then | |
| odin test ./wakeup/ -vet -strict-style -disallow-do -o:none -debug | |
| else | |
| odin test ./wakeup/ -vet -strict-style -disallow-do -o:${{ matrix.opt }} | |
| fi | |
| - name: Build try_mbox lib | |
| shell: bash | |
| run: | | |
| if [ "${{ matrix.opt }}" = "none" ]; then | |
| odin build ./try_mbox/ -build-mode:lib -vet -strict-style -o:none -debug | |
| else | |
| odin build ./try_mbox/ -build-mode:lib -vet -strict-style -o:${{ matrix.opt }} | |
| fi | |
| - name: Test try_mbox | |
| shell: bash | |
| run: | | |
| if [ "${{ matrix.opt }}" = "none" ]; then | |
| odin test ./try_mbox/ -vet -strict-style -disallow-do -o:none -debug | |
| else | |
| odin test ./try_mbox/ -vet -strict-style -disallow-do -o:${{ matrix.opt }} | |
| fi | |
| - name: Build nbio_mbox lib | |
| shell: bash | |
| run: | | |
| if [ "${{ matrix.opt }}" = "none" ]; then | |
| odin build ./nbio_mbox/ -build-mode:lib -vet -strict-style -o:none -debug | |
| else | |
| odin build ./nbio_mbox/ -build-mode:lib -vet -strict-style -o:${{ matrix.opt }} | |
| fi | |
| - name: Test nbio_mbox | |
| shell: bash | |
| run: | | |
| if [ "${{ matrix.opt }}" = "none" ]; then | |
| odin test ./nbio_mbox/ -vet -strict-style -disallow-do -o:none -debug | |
| else | |
| odin test ./nbio_mbox/ -vet -strict-style -disallow-do -o:${{ matrix.opt }} | |
| fi | |
| - name: Build pool lib | |
| shell: bash | |
| run: | | |
| if [ "${{ matrix.opt }}" = "none" ]; then | |
| odin build ./pool/ -build-mode:lib -vet -strict-style -o:none -debug | |
| else | |
| odin build ./pool/ -build-mode:lib -vet -strict-style -o:${{ matrix.opt }} | |
| fi | |
| - name: Build examples | |
| shell: bash | |
| run: | | |
| if [ "${{ matrix.opt }}" = "none" ]; then | |
| odin build ./examples/ -build-mode:lib -vet -strict-style -o:none -debug | |
| else | |
| odin build ./examples/ -build-mode:lib -vet -strict-style -o:${{ matrix.opt }} | |
| fi | |
| - name: Test tests | |
| shell: bash | |
| run: | | |
| if [ "${{ matrix.opt }}" = "none" ]; then | |
| odin test ./tests/ -vet -strict-style -disallow-do -o:none -debug | |
| else | |
| odin test ./tests/ -vet -strict-style -disallow-do -o:${{ matrix.opt }} | |
| fi | |
| - name: Build pool_tests | |
| shell: bash | |
| run: | | |
| if [ "${{ matrix.opt }}" = "none" ]; then | |
| odin build ./pool_tests/ -build-mode:lib -vet -strict-style -o:none -debug | |
| else | |
| odin build ./pool_tests/ -build-mode:lib -vet -strict-style -o:${{ matrix.opt }} | |
| fi | |
| - name: Test pool_tests | |
| shell: bash | |
| run: | | |
| if [ "${{ matrix.opt }}" = "none" ]; then | |
| odin test ./pool_tests/ -vet -strict-style -disallow-do -o:none -debug | |
| else | |
| odin test ./pool_tests/ -vet -strict-style -disallow-do -o:${{ matrix.opt }} | |
| fi | |
| - name: Doc smoke test | |
| shell: bash | |
| run: | | |
| odin doc ./ | |
| odin doc ./mbox/ | |
| odin doc ./mpsc/ | |
| odin doc ./wakeup/ | |
| odin doc ./try_mbox/ | |
| odin doc ./nbio_mbox/ | |
| odin doc ./pool/ | |
| odin doc ./pool_tests/ | |
| odin doc ./examples/ | |
| odin doc ./tests/ | |
| - name: Generate doc files | |
| if: matrix.os == 'ubuntu-latest' && matrix.opt == 'none' | |
| shell: bash | |
| run: | | |
| mkdir -p doc-out | |
| odin doc ./ > doc-out/mbox.txt | |
| odin doc ./mbox/ > doc-out/mbox_pkg.txt | |
| odin doc ./mpsc/ > doc-out/mpsc.txt | |
| odin doc ./wakeup/ > doc-out/wakeup.txt | |
| odin doc ./try_mbox/ > doc-out/try_mbox.txt | |
| odin doc ./nbio_mbox/ > doc-out/nbio_mbox.txt | |
| odin doc ./pool/ > doc-out/pool.txt | |
| odin doc ./pool_tests/ > doc-out/pool_tests.txt | |
| odin doc ./examples/ > doc-out/examples.txt | |
| odin doc ./tests/ > doc-out/tests.txt | |
| - name: Upload doc artifact | |
| if: matrix.os == 'ubuntu-latest' && matrix.opt == 'none' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: odin-doc | |
| path: doc-out/ |