Skip to content

Commit f79fdf7

Browse files
Update github actions
1 parent ff54f56 commit f79fdf7

File tree

6 files changed

+101
-12
lines changed

6 files changed

+101
-12
lines changed

.github/workflows/build.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Build Project
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
8+
jobs:
9+
linux:
10+
strategy:
11+
matrix:
12+
include:
13+
- target: x86_64-unknown-linux-gnu
14+
- target: i686-unknown-linux-gnu
15+
deps: apt-get install -y gcc-multilib
16+
- target: aarch64-unknown-linux-gnu
17+
deps: apt-get install -y gcc-aarch64-linux-gnu
18+
- target: armv7-unknown-linux-gnueabihf
19+
deps: apt-get install -y gcc-arm-linux-gnueabihf
20+
21+
name: Build ${{ matrix.target }}
22+
runs-on: ubuntu-latest
23+
container:
24+
image: ubuntu:18.04
25+
steps:
26+
- name: Checkout sources
27+
uses: taiki-e/checkout-action@v1
28+
- name: Install Essentials
29+
run: |
30+
apt-get update -y
31+
apt-get upgrade -y
32+
apt-get install -y curl gcc openjdk-17-jdk-headless
33+
- name: Install Rust toolchain
34+
uses: dtolnay/rust-toolchain@stable
35+
with:
36+
toolchain: stable
37+
targets: ${{ matrix.target }}
38+
- name: Install linker dependencies
39+
run: ${{ matrix.deps }}
40+
if: ${{ matrix.deps != '' }}
41+
- name: Run Gradle Build
42+
run: ./gradlew build -Ptarget=${{ matrix.target }}
43+
windows:
44+
strategy:
45+
matrix:
46+
include:
47+
- target: x86_64-pc-windows-msvc
48+
- target: i686-pc-windows-msvc
49+
50+
name: Build ${{ matrix.target }}
51+
runs-on: windows-2022
52+
steps:
53+
- name: Checkout sources
54+
uses: actions/checkout@v6
55+
- name: Install Rust toolchain
56+
uses: dtolnay/rust-toolchain@stable
57+
with:
58+
toolchain: stable
59+
target: ${{ matrix.target }}
60+
- name: Set up JDK
61+
uses: actions/setup-java@v5
62+
with:
63+
distribution: 'temurin'
64+
java-version: '17'
65+
cache: 'gradle'
66+
- name: Run Gradle Build
67+
run: ./gradlew build -Ptarget=${{ matrix.target }}
68+
69+
macos:
70+
name: Build macOS universal binary
71+
runs-on: macos-14
72+
steps:
73+
- name: Checkout sources
74+
uses: actions/checkout@v6
75+
76+
- name: Install Rust toolchain
77+
uses: dtolnay/rust-toolchain@stable
78+
with:
79+
toolchain: stable
80+
81+
- name: Compile natives
82+
working-directory: native
83+
run: |
84+
rustup target add x86_64-apple-darwin
85+
cargo build -r --target=x86_64-apple-darwin
86+
rustup target add aarch64-apple-darwin
87+
cargo build -r --target=aarch64-apple-darwin
88+
89+
- name: Create target directory for darwin
90+
run: mkdir -p native/target/darwin/release
91+
92+
- name: Combine to universal dylib
93+
run: lipo -create -output native/target/darwin/release/libudpqueue.dylib native/target/**/release/*.dylib
94+
95+
- name: Run Gradle Build
96+
run: ./gradlew build -x cargoBuild -Ptarget=darwin

.github/workflows/publish.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
name: publish-natives
22

33
on:
4-
push:
5-
branches: [ "master" ]
6-
paths:
7-
- '.github/workflows/publish.yml' # when new targets are added
8-
- 'build.gradle.kts' # when the root build script changes
9-
- 'api' # when api source is changed
10-
- 'native' # when natives are changed
114
workflow_dispatch:
125

136
concurrency:
@@ -39,7 +32,7 @@ jobs:
3932
run: |
4033
apt-get update -y
4134
apt-get upgrade -y
42-
apt-get install -y curl gcc openjdk-8-jdk-headless
35+
apt-get install -y curl gcc openjdk-25-jdk-headless
4336
- name: Setup rustup
4437
run: |
4538
curl --proto '=https' --tlsv1.2 --retry 10 --location --silent --show-error --fail "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ MacOS/Darwin universal (x86 intel & aarch64 M1):
3333

3434
[![](https://img.shields.io/maven-central/v/club.minnced/udpqueue-native-darwin?color=blue&label=darwin&logo=apple&logoColor=white)](https://search.maven.org/artifact/club.minnced/udpqueue-native-darwin)
3535

36-
More platforms can be added on request. Linux shared libraries are compiled against **GLIBC 2.18**.
36+
More platforms can be added on request. Linux shared libraries are compiled against **GLIBC 2.27**.
3737

3838
Simply install the version of `udpqueue-native-*` for your platform:
3939

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66

77
java {
88
toolchain {
9-
languageVersion.set(JavaLanguageVersion.of(25))
9+
languageVersion.set(JavaLanguageVersion.of(17))
1010
}
1111
}
1212

buildSrc/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ dependencies {
1818
}
1919

2020
kotlin {
21-
jvmToolchain(25)
21+
jvmToolchain(17)
2222
}
2323

2424
java {
2525
toolchain {
26-
languageVersion.set(JavaLanguageVersion.of(25))
26+
languageVersion.set(JavaLanguageVersion.of(17))
2727
}
2828
}
2929

gradlew

100644100755
File mode changed.

0 commit comments

Comments
 (0)