Skip to content

Commit cc08931

Browse files
authored
Merge pull request #140 from stepfunc/dev
Prepare 1.4.0-RC1
2 parents f5ae983 + e86837d commit cc08931

File tree

39 files changed

+1202
-785
lines changed

39 files changed

+1202
-785
lines changed

.github/workflows/ci.yml

+38-25
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ jobs:
119119
- name: Create the FFI modules dir
120120
run: mkdir ffi-modules\${{ matrix.target }}
121121
- name: Build FFI
122-
run: cargo build -p rodbus-ffi --release --target ${{ matrix.target }} --message-format json | Out-File -encoding "UTF8" .\ffi-modules\${{ matrix.target }}\build.ffi.log
122+
run: cargo build -p rodbus-ffi --release --target ${{ matrix.target }}
123123
- name: Build JNI
124-
run: cargo build -p rodbus-ffi-java --release --target ${{ matrix.target }} --message-format json | Out-File -encoding "UTF8" .\ffi-modules\${{ matrix.target }}\build.jni.log
124+
run: cargo build -p rodbus-ffi-java --release --target ${{ matrix.target }}
125125
- name: Copy the FFI and JNI libs
126126
shell: pwsh
127127
run: |
@@ -144,12 +144,15 @@ jobs:
144144
run: cargo run --bin rodbus-bindings -- --java -r ${{ matrix.target }} -a ./target/${{ matrix.target }}/release
145145
# Build bindings on MacOS [64-bit macOS (10.7+, Lion+) (x86_64-apple-darwin)]
146146
bindings-macos:
147-
runs-on: macos-latest
148147
strategy:
149148
fail-fast: false
150149
matrix:
151-
target:
152-
- x86_64-apple-darwin # 64-bit macOS (10.7+, Lion+)
150+
include:
151+
- runner: macos-14
152+
target: aarch64-apple-darwin
153+
- runner: macos-13
154+
target: x86_64-apple-darwin
155+
runs-on: ${{ matrix.runner }}
153156
steps:
154157
- name: Checkout
155158
uses: actions/checkout@v3
@@ -158,9 +161,9 @@ jobs:
158161
- name: Create FFI modules dir
159162
run: mkdir -p ffi-modules/${{ matrix.target }}
160163
- name: Build FFI
161-
run: cargo build -p rodbus-ffi --release --message-format json > ffi-modules/${{ matrix.target }}/build.ffi.log
164+
run: cargo build -p rodbus-ffi --release
162165
- name: Build JNI
163-
run: cargo build -p rodbus-ffi-java --release --message-format json > ffi-modules/${{ matrix.target }}/build.jni.log
166+
run: cargo build -p rodbus-ffi-java --release
164167
- name: Copy the FFI and JNI libs
165168
run: |
166169
cp ./target/release/librodbus_ffi.dylib ./ffi-modules/${{ matrix.target }}
@@ -204,9 +207,9 @@ jobs:
204207
- name: Create ffi-modules dir
205208
run: mkdir -p ffi-modules/${{ matrix.target }}
206209
- name: Build FFI
207-
run: cross build -p rodbus-ffi --release --target ${{ matrix.target }} --message-format json > ffi-modules/${{ matrix.target }}/build.ffi.log
210+
run: cross build -p rodbus-ffi --release --target ${{ matrix.target }}
208211
- name: Build JNI
209-
run: cross build -p rodbus-ffi-java --release --target ${{ matrix.target }} --message-format json > ffi-modules/${{ matrix.target }}/build.jni.log
212+
run: cross build -p rodbus-ffi-java --release --target ${{ matrix.target }}
210213
- name: Copy the FFI and JNI libs
211214
run: |
212215
cp ./target/${{ matrix.target }}/release/librodbus_ffi.so ./ffi-modules/${{ matrix.target }}
@@ -242,26 +245,36 @@ jobs:
242245
steps:
243246
- name: Install Rust
244247
uses: dtolnay/rust-toolchain@stable
245-
- name: Checkout BOM tools repo
246-
uses: actions/checkout@v3
247-
with:
248-
repository: stepfunc/bom-tools
249-
ref: 0.1.0
250-
path: bom-tools
251-
- name: Install BOM tools
252-
working-directory: bom-tools
253-
run: cargo install --path bom-tools
248+
- name: Install Cargo CycloneDx
249+
run: cargo install cargo-cyclonedx
250+
- name: Install custom allow-list tool
251+
run: cargo install --git https://github.com/stepfunc/bom-tools.git
254252
- name: Checkout
255-
uses: actions/checkout@v3
253+
uses: actions/checkout@v4
256254
- name: Download compiled FFI
257255
uses: actions/download-artifact@v3
258256
with:
259257
name: ffi-modules
260258
path: ffi-modules
259+
- name: Create SBOMs
260+
run: |
261+
for dir in ffi-modules/*; do
262+
echo "processing path: $dir"
263+
target=`basename "${dir}"`
264+
cargo cyclonedx -f json --target $target
265+
mv ./ffi/rodbus-ffi/rodbus-ffi.cdx.json ffi-modules/$target
266+
mv ./ffi/rodbus-ffi-java/rodbus-ffi-java.cdx.json ffi-modules/$target
267+
done
261268
- name: Create FFI third-party-licenses.txt
262-
run: bom-tools gen-licenses-dir ./ffi-modules build.ffi.log ./dep_config.json > third-party-licenses.txt
263-
- name: Package all bindings
264-
run: cargo run --bin rodbus-bindings -- --package ./ffi-modules --options ./packaging.json -f third-party-licenses.txt
269+
run: allow-list gen-licenses-dir -l ffi-modules -b rodbus-ffi.cdx.json -c allowed.json > third-party-licenses.txt
270+
- name: Create FFI third-party-licenses-java.txt
271+
run: allow-list gen-licenses-dir -l ffi-modules -b rodbus-ffi-java.cdx.json -c allowed.json > third-party-licenses-java.txt
272+
- name: Package C/C++ bindings
273+
run: cargo run --bin rodbus-bindings -- --c --package ./ffi-modules --options ./packaging.json -f third-party-licenses.txt
274+
- name: Package .NET bindings
275+
run: cargo run --bin rodbus-bindings -- --dotnet --package ./ffi-modules --options ./packaging.json -f third-party-licenses.txt
276+
- name: Package Java bindings
277+
run: cargo run --bin rodbus-bindings -- --java --package ./ffi-modules --options ./packaging.json -f third-party-licenses-java.txt
265278
- name: Upload C/C++ bindings
266279
uses: actions/upload-artifact@v3
267280
with:
@@ -327,9 +340,9 @@ jobs:
327340
working-directory: artifacts/java-bindings
328341
run: >
329342
shopt -s extglob &&
330-
mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2 -DrepositoryId=ossrh -DpomFile=pom.xml -Dfile=$(find rodbus-+([0-9]).+([0-9]).+([0-9])*(-rc+([0-9])).jar) &&
331-
mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2 -DrepositoryId=ossrh -DpomFile=pom.xml -Dfile=$(find rodbus-+([0-9]).+([0-9]).+([0-9])*(-rc+([0-9]))-sources.jar) -Dclassifier=sources &&
332-
mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2 -DrepositoryId=ossrh -DpomFile=pom.xml -Dfile=$(find rodbus-+([0-9]).+([0-9]).+([0-9])*(-rc+([0-9]))-javadoc.jar) -Dclassifier=javadoc
343+
mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2 -DrepositoryId=ossrh -DpomFile=pom.xml -Dfile=rodbus-${{github.ref_name}}.jar &&
344+
mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2 -DrepositoryId=ossrh -DpomFile=pom.xml -Dfile=rodbus-${{github.ref_name}}-sources.jar -Dclassifier=sources &&
345+
mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2 -DrepositoryId=ossrh -DpomFile=pom.xml -Dfile=rodbus-${{github.ref_name}}-javadoc.jar -Dclassifier=javadoc
333346
- name: Publish NuGet package
334347
shell: bash
335348
run: dotnet nuget push $(find artifacts/dotnet-bindings/rodbus*.nupkg) -s https://api.nuget.org/v3/index.json -k ${{ secrets.SFIO_NUGET_KEY }}

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### 1.4.0-RC1 ###
2+
* :wrench: Avoid task spawning in client FFI methods. See [#136](https://github.com/stepfunc/rodbus/pull/136).
3+
* :wrench: Requests in the client API now fail immediately while the client is connecting.
4+
15
### 1.3.1 ###
26
* :bug: Fix issue with master channels not properly exiting and thrashing CPU. See [#120](https://github.com/stepfunc/rodbus/issues/120).
37

0 commit comments

Comments
 (0)