Update README.md #76
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: [master] | |
| pull_request: | |
| branches: [master] | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| jobs: | |
| build-linux: | |
| runs-on: ntnu-runners | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install xz | |
| run: sudo apt-get update && sudo apt-get install -y xz-utils | |
| - uses: mlugg/setup-zig@v2 | |
| with: | |
| version: 0.16.0 | |
| - run: cd crdt-lib && zig build | |
| - run: cd crdt-lib && zig build test --summary all | |
| - run: cd crdt-server && zig build | |
| - run: cd crdt-server && zig build test --summary all | |
| - uses: actions/upload-artifact@v3 | |
| with: | |
| name: crdt-server-linux | |
| path: crdt-server/zig-out/bin/crdt-server | |
| if-no-files-found: error | |
| build-windows: | |
| runs-on: ntnu-runners | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install xz and wine | |
| run: sudo apt-get update && sudo apt-get install -y xz-utils wine | |
| - uses: mlugg/setup-zig@v2 | |
| with: | |
| version: 0.16.0 | |
| - run: cd crdt-lib && zig build -Dtarget=x86_64-windows-gnu | |
| - run: cd crdt-lib && zig build test -Dtarget=x86_64-windows-gnu -fwine --summary all | |
| - run: cd crdt-server && zig build -Dtarget=x86_64-windows-gnu | |
| - run: cd crdt-server && zig build test -Dtarget=x86_64-windows-gnu -fwine --summary all | |
| - uses: actions/upload-artifact@v3 | |
| with: | |
| name: crdt-server-windows | |
| path: crdt-server/zig-out/bin/crdt-server.exe | |
| if-no-files-found: error | |
| build-macos: | |
| runs-on: ntnu-runners | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install xz | |
| run: sudo apt-get update && sudo apt-get install -y xz-utils | |
| - uses: mlugg/setup-zig@v2 | |
| with: | |
| version: 0.16.0 | |
| - run: cd crdt-lib && zig build -Dtarget=x86_64-macos-none | |
| - run: cd crdt-server && zig build -Dtarget=x86_64-macos-none | |
| - uses: actions/upload-artifact@v3 | |
| with: | |
| name: crdt-server-macos-x86_64 | |
| path: crdt-server/zig-out/bin/crdt-server | |
| if-no-files-found: error | |
| - run: cd crdt-lib && zig build -Dtarget=aarch64-macos-none | |
| - run: cd crdt-server && zig build -Dtarget=aarch64-macos-none | |
| - uses: actions/upload-artifact@v3 | |
| with: | |
| name: crdt-server-macos-aarch64 | |
| path: crdt-server/zig-out/bin/crdt-server | |
| if-no-files-found: error | |
| build-docs: | |
| runs-on: ntnu-runners | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install xz | |
| run: sudo apt-get update && sudo apt-get install -y xz-utils | |
| - uses: mlugg/setup-zig@v2 | |
| with: | |
| version: 0.16.0 | |
| - run: cd crdt-lib && zig build docs | |
| - run: cd crdt-server && zig build docs | |
| - name: Combine docs | |
| run: | | |
| mkdir -p staging/lib staging/server | |
| cp -r crdt-lib/zig-out/docs/* staging/lib/ | |
| cp -r crdt-server/zig-out/docs/* staging/server/ | |
| cp .github/pages/index.html staging/ | |
| - uses: actions/upload-pages-artifact@v2 | |
| with: | |
| path: staging | |
| deploy-docs: | |
| if: github.ref == 'refs/heads/master' | |
| needs: build-docs | |
| runs-on: ntnu-runners | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - uses: actions/deploy-pages@v3 | |
| id: deployment |