Silence base ingest stderr when base doesn't support ingest #10
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: Canary | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: canary | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| env: | |
| # Don't reference `secrets.*` in `if:` expressions; GitHub rejects that at workflow-parse time. | |
| MACOS_SIGN_P12_B64: ${{ secrets.MACOS_SIGN_P12_B64 }} | |
| MACOS_SIGN_P12_PASSWORD: ${{ secrets.MACOS_SIGN_P12_PASSWORD }} | |
| MACOS_SIGN_IDENTITY: ${{ secrets.MACOS_SIGN_IDENTITY }} | |
| strategy: | |
| matrix: | |
| include: | |
| - target: x86_64-apple-darwin | |
| os: macos-latest | |
| - target: aarch64-apple-darwin | |
| os: macos-latest | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| - target: aarch64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Install cross-compilation tools (Linux ARM) | |
| if: matrix.target == 'aarch64-unknown-linux-gnu' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-aarch64-linux-gnu | |
| - name: Build | |
| run: | | |
| if [ "${{ matrix.target }}" = "aarch64-unknown-linux-gnu" ]; then | |
| export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc | |
| fi | |
| cargo build --release --target ${{ matrix.target }} | |
| - name: Import code-signing certificates (macOS) | |
| if: runner.os == 'macOS' && env.MACOS_SIGN_P12_B64 != '' | |
| uses: apple-actions/import-codesign-certs@v3 | |
| with: | |
| p12-file-base64: ${{ env.MACOS_SIGN_P12_B64 }} | |
| p12-password: ${{ env.MACOS_SIGN_P12_PASSWORD }} | |
| - name: Codesign (macOS) | |
| if: runner.os == 'macOS' && env.MACOS_SIGN_P12_B64 != '' && env.MACOS_SIGN_IDENTITY != '' | |
| run: | | |
| BIN="target/${{ matrix.target }}/release/f" | |
| codesign --force --options runtime --timestamp --sign "$MACOS_SIGN_IDENTITY" "$BIN" | |
| codesign -vvv --strict "$BIN" | |
| - name: Package | |
| run: | | |
| mkdir -p dist | |
| cp target/${{ matrix.target }}/release/f dist/ | |
| cd dist | |
| tar -czvf flow-${{ matrix.target }}.tar.gz f | |
| cd .. | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: flow-${{ matrix.target }} | |
| path: dist/flow-${{ matrix.target }}.tar.gz | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Prepare release files | |
| run: | | |
| mkdir -p release | |
| find artifacts -name "*.tar.gz" -exec cp {} release/ \; | |
| cd release | |
| sha256sum *.tar.gz > checksums.txt | |
| cat checksums.txt | |
| - name: Move canary tag to this commit | |
| run: | | |
| git tag -f canary "${GITHUB_SHA}" | |
| git push origin -f refs/tags/canary | |
| - name: Create/Update Canary Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: canary | |
| name: Canary | |
| prerelease: true | |
| generate_release_notes: false | |
| files: release/* | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |