Initial design of nbio commands #36
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 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: Doc smoke test | |
| shell: bash | |
| run: | | |
| odin doc ./ | |
| 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 ./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/ |