Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: OMB CI
on:
push:
branches: [main]
pull_request:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, so we get build on PRs too, nice!

branches:
- main
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying out all the YAML list variations, huh?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOL I don't understand yaml to this day.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this one the normal one?

Copy link
Member

@travisdowns travisdowns Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the most common one I think but right above for identical branches you have the other one.

Copy link
Member

@ivotron ivotron Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just to clarify:

  • push.branches. triggers it whenever a commit gets pushed to the given list of branches. so this would trigger when a PR is merged to the main branch, and also if someone pushed directly to it (though we disallow that via branch protection rules)
  • pull_request.branches. triggers the job when a PR against the main branch is opened, or when new commits to an existing PR's branch are pushed
  • workflow_dispatch. allows the workflow to be triggered by other workflows or manually when a person runs it from the web UI.

so your goal is to have this workflow run in any of the above scenarios?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes the first two is what we want.

The last I don't really mind but is good to have I guess.

workflow_dispatch: {}
jobs:
build_and_upload:
runs-on: ubuntu-24.04

permissions:
contents: read
id-token: write

steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v5
with:
aws-region: ${{ vars.RP_AWS_CRED_REGION }}
role-to-assume: arn:aws:iam::${{ secrets.RP_AWS_CRED_ACCOUNT_ID }}:role/${{ vars.RP_AWS_CRED_BASE_ROLE_NAME }}${{ github.event.repository.name }}

- uses: actions/checkout@v5

- name: Install java
run: sudo apt-get update && sudo apt-get install -y maven default-jdk

- name: Build binaries
run: mvn clean compile package -DskipTests

- name: Upload to S3 bucket
if: github.event_name == 'push'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this works on a GH "merge PR" click, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what I expect yes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so this will ONLY upload when a PR is merged. that's what you want, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes exactly.

run: |
aws s3 cp package-minimal/target/openmessaging-benchmark-0.0.1-SNAPSHOT-bin.tar.gz s3://vectorized-public/dependencies/omb/omb_minimal_${{ github.sha }}.tar.gz