Skip to content

Commit 058840a

Browse files
authored
ci: add build workflow that runs make test (#15)
## Summary - Adds `.github/workflows/build.yml` running on pushes to `main` and on PRs targeting `main`. - Sets up Temurin JDK 17 and a stable Rust toolchain, caches Maven (`~/.m2`) and cargo (`native/target`) artifacts, then runs `make test`. ## Rationale The project currently has no CI: `format.yml` was removed in #7 to clear a deadlock when GitHub Actions wasn't yet enabled, and #11 nulled out the stale branch protection rules left behind. With Actions now in place, we need at least one workflow that exercises the build on every PR so regressions surface before merge. `make test` is the canonical full build entry point documented in `README.md` and `CONTRIBUTING.md` — it depends on the `native` target (so it builds the Rust crate first) and then runs the JVM JUnit suite, which is exactly what CI needs to cover. ## What's in this PR - `.github/workflows/build.yml`: single `build` job on `ubuntu-latest`, JDK 17 (Temurin) with Maven cache via `actions/setup-java`, Rust stable via `dtolnay/rust-toolchain`, cargo cache via `Swatinem/rust-cache` scoped to the `native` workspace, then `make test`. ## Not in this PR - Spotless / Apache RAT / clippy / `cargo fmt` checks. These run at Maven's `verify` phase or via separate cargo commands and aren't wired into the Makefile yet; they can be added in a follow-up once we decide whether to extend the Makefile or invoke them directly from CI. - Matrix builds across OS or JDK versions — start minimal, expand if needed.
1 parent 5292e05 commit 058840a

2 files changed

Lines changed: 53 additions & 1 deletion

File tree

‎.asf.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ github:
4848
issues: true
4949
discussions: true
5050
protected_branches:
51-
main: ~
51+
main: {}
5252
pull_requests:
5353
allow_update_branch: true
5454
allow_auto_merge: true

‎.github/workflows/build.yml‎

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: Build
19+
20+
on:
21+
push:
22+
branches: [main]
23+
pull_request:
24+
branches: [main]
25+
26+
permissions:
27+
contents: read
28+
29+
jobs:
30+
build:
31+
name: make test
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v4
35+
36+
- name: Set up JDK 17
37+
uses: actions/setup-java@v4
38+
with:
39+
distribution: temurin
40+
java-version: '17'
41+
cache: maven
42+
43+
- name: Set up Rust toolchain
44+
uses: dtolnay/rust-toolchain@stable
45+
46+
- name: Cache cargo build
47+
uses: Swatinem/rust-cache@v2
48+
with:
49+
workspaces: native
50+
51+
- name: Build native and run JVM tests
52+
run: make test

0 commit comments

Comments
 (0)