nightly-build #651
This file contains 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: nightly-build | |
on: | |
schedule: | |
- cron: '55 23 * * *' | |
push: | |
branches: | |
- dev-nightly* | |
permissions: | |
contents: read | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build-go-binaries: | |
runs-on: ubuntu-20.04 | |
if: github.repository == 'numaproj/numaflow' | |
name: Build binaries | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.23' | |
- name: Build binaries | |
run: | | |
make build | |
chmod -R +x dist | |
- name: Make checksums | |
run: make checksums | |
- name: store artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: binaries | |
path: dist | |
build-rust-amd64: | |
runs-on: ubuntu-24.04 | |
defaults: | |
run: | |
working-directory: ./rust | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Rust toolchain | |
uses: actions-rust-lang/[email protected] | |
with: | |
cache-workspaces: rust -> target | |
rustflags: '' | |
- name: Configure sccache | |
run: | | |
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV | |
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV | |
- name: Run sccache-cache | |
uses: mozilla-actions/[email protected] | |
- name: Install dependencies | |
run: sudo apt-get install -y protobuf-compiler | |
- name: Build binary | |
run: RUSTFLAGS='-C target-feature=+crt-static' cargo build --release --target x86_64-unknown-linux-gnu | |
- name: Rename binary | |
run: cp -pv target/x86_64-unknown-linux-gnu/release/numaflow numaflow-rs-linux-amd64 | |
- name: Upload numaflow binary | |
uses: actions/upload-artifact@v3 | |
with: | |
name: numaflow-rs-linux-amd64 | |
path: rust/numaflow-rs-linux-amd64 | |
build-rust-arm64: | |
runs-on: ubuntu-24.04 | |
defaults: | |
run: | |
working-directory: ./rust | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Update Rust Toolchain Target | |
run: | | |
echo "targets = ['aarch64-unknown-linux-gnu']" >> rust-toolchain.toml | |
- name: Setup Rust toolchain | |
uses: actions-rust-lang/[email protected] | |
with: | |
cache-workspaces: rust -> target | |
rustflags: '' | |
- name: Configure sccache | |
run: | | |
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV | |
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV | |
- name: Run sccache-cache | |
uses: mozilla-actions/[email protected] | |
- name: Install dependenices | |
run: sudo apt-get install -y gcc-aarch64-linux-gnu protobuf-compiler | |
- name: Build binary | |
run: RUSTFLAGS='-C target-feature=+crt-static -C linker=aarch64-linux-gnu-gcc' cargo build --release --target aarch64-unknown-linux-gnu | |
- name: Rename binary | |
run: cp -pv target/aarch64-unknown-linux-gnu/release/numaflow numaflow-rs-linux-arm64 | |
- name: Upload numaflow binary | |
uses: actions/upload-artifact@v3 | |
with: | |
name: numaflow-rs-linux-arm64 | |
path: rust/numaflow-rs-linux-arm64 | |
build-push-linux-multi: | |
name: Build & push linux/amd64 and linux/arm64 | |
needs: [ build-go-binaries, build-rust-amd64, build-rust-arm64] | |
runs-on: ubuntu-20.04 | |
if: github.repository == 'numaproj/numaflow' | |
strategy: | |
matrix: | |
target: [ numaflow ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
- name: Setup Node-Cache | |
uses: actions/cache@v4 | |
with: | |
path: ui/node_modules | |
key: ${{ runner.os }}-node-dep-v1-${{ hashFiles('**/yarn.lock') }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Download Go binaries | |
uses: actions/download-artifact@v3 | |
with: | |
name: binaries | |
path: dist/ | |
- name: Download Rust amd64 binaries | |
uses: actions/download-artifact@v3 | |
with: | |
name: numaflow-rs-linux-amd64 | |
path: dist/ | |
- name: Download Rust arm64 binaries | |
uses: actions/download-artifact@v3 | |
with: | |
name: numaflow-rs-linux-arm64 | |
path: dist/ | |
- name: Registry Login | |
uses: docker/login-action@v2 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAYIO_USERNAME }} | |
password: ${{ secrets.QUAYIO_PASSWORD }} | |
- name: Set Version | |
id: version | |
run: | | |
tag=$(date +"%Y%m%d") | |
echo "VERSION=nightly-$tag" >> $GITHUB_OUTPUT | |
- name: Container build and push with arm64/amd64 | |
run: | | |
IMAGE_NAMESPACE=${{ secrets.QUAYIO_ORG }} VERSION=${{ steps.version.outputs.VERSION }} DOCKER_PUSH=true DOCKER_BUILD_ARGS="--label \"quay.expires-after=30d\"" make image-multi |