add Matrix room link to README, docs, and sidebar #41
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] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: llvm-tools-preview | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@cargo-llvm-cov | |
| - name: Install Protoc | |
| uses: arduino/setup-protoc@v3 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run tests with coverage | |
| run: cargo llvm-cov --codecov --output-path codecov.json | |
| - name: Upload to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: codecov.json | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| build: | |
| strategy: | |
| matrix: | |
| include: | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| name: linux-amd64 | |
| - target: aarch64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| name: linux-arm64 | |
| - target: aarch64-apple-darwin | |
| os: macos-latest | |
| name: macos-arm64 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Install cargo-zigbuild | |
| run: cargo install cargo-zigbuild | |
| - name: Install Zig | |
| uses: goto-bus-stop/setup-zig@v2 | |
| with: | |
| version: 0.13.0 | |
| - name: Install Protoc | |
| uses: arduino/setup-protoc@v3 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build | |
| run: | | |
| ulimit -n 10240 || true | |
| cargo zigbuild --release --target ${{ matrix.target }} | |
| - name: Package | |
| run: | | |
| mkdir -p dist | |
| cp target/${{ matrix.target }}/release/lattice dist/lattice-${{ matrix.name }} | |
| cp target/${{ matrix.target }}/release/latticed dist/latticed-${{ matrix.name }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: binaries-${{ matrix.name }} | |
| path: dist/* | |
| retention-days: 14 | |
| # Update the "dev" pre-release with latest binaries (main branch only) | |
| update-dev-release: | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Prepare release files | |
| run: | | |
| mkdir -p release | |
| find artifacts -type f \( -name 'lattice-*' -o -name 'latticed-*' \) -exec cp {} release/ \; | |
| ls -la release/ | |
| - name: Update dev release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: dev | |
| name: Development Build | |
| prerelease: true | |
| files: | | |
| release/lattice-* | |
| release/latticed-* | |
| body: | | |
| **Latest development build from `main` branch.** | |
| Commit: ${{ github.sha }} | |
| Built: ${{ github.event.head_commit.timestamp }} | |
| ⚠️ These are unstable development builds. Use tagged releases for production. |