Skip to content

Commit 64c7d7c

Browse files
committed
test: Add CI workflow for building JNI native code.
1 parent 1fddb99 commit 64c7d7c

File tree

4 files changed

+28
-3
lines changed

4 files changed

+28
-3
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: ci
3+
4+
on:
5+
pull_request:
6+
branches: [master]
7+
8+
# Cancel old PR builds when pushing new commits.
9+
concurrency:
10+
group: build-${{ github.event.pull_request.number || github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
common:
15+
uses: TokTok/ci-tools/.github/workflows/common-ci.yml@master
16+
17+
docker-jvm:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Set up Docker Buildx
21+
uses: docker/setup-buildx-action@v3
22+
- name: Build toxchat/jvm-toxcore-c:jvm
23+
uses: docker/build-push-action@v5
24+
with:
25+
file: docker/jvm.Dockerfile
26+
tags: toxchat/jvm-toxcore-c:jvm

docker/jvm.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ WORKDIR /work/jvm-toxcore-c
1919
COPY scripts/ /work/jvm-toxcore-c/scripts/
2020
RUN scripts/build-host "$PWD/_install/host/protobuf.stamp" "-j$(nproc)"
2121
RUN scripts/build-host "$PWD/_install/host/toxcore.stamp" "-j$(nproc)"
22-
COPY cpp/ /work/jvm-toxcore-c/cpp/
22+
COPY lib/src/cpp/ /work/jvm-toxcore-c/lib/src/cpp/
2323
RUN scripts/build-host #"-j$(nproc)"

lib/src/cpp/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
project(tox4j-c)
22
cmake_minimum_required(VERSION 2.8.7)
3-
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/tools/cmake")
43

54
if(NOT DEFINED CMAKE_MACOSX_RPATH)
65
set(CMAKE_MACOSX_RPATH true)

scripts/dependencies.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PRE_RULE = (echo "=== Building $@ ==="; ls -ld $@; true) && ls -ld $+
22
POST_RULE = ls -ld $@
33

4-
$(BUILDDIR)/tox4j/Makefile: $(CURDIR)/cpp/CMakeLists.txt $(TOOLCHAIN_FILE) $(foreach i,protobuf toxcore,$(PREFIX)/$i.stamp)
4+
$(BUILDDIR)/tox4j/Makefile: $(CURDIR)/lib/src/cpp/CMakeLists.txt $(TOOLCHAIN_FILE) $(foreach i,protobuf toxcore,$(PREFIX)/$i.stamp)
55
@$(PRE_RULE)
66
mkdir -p $(@D)
77
cd $(@D) && cmake $(<D) $($(notdir $(@D))_CONFIGURE)

0 commit comments

Comments
 (0)