Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare 1.6.0 release #2

Merged
merged 5 commits into from
Jun 26, 2024
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
59 changes: 26 additions & 33 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,18 @@ jobs:
- target: x86_64-pc-windows-msvc # 64-bit MSVC (Windows 7+)
steps:
- name: Checkout DNP3
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: stepfunc/dnp3
ref: 1.5.2
- name: Install Rust
uses: actions-rs/toolchain@v1
ref: 1.6.0
- name: Install Rust ${{ matrix.rust }}
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true
- name: Create FFI modules dir
run: mkdir ffi-modules\${{ matrix.target }}
- name: Build FFI
run: cargo build --release -p dnp3-ffi --no-default-features --features tls --target ${{ matrix.target }} --message-format json | Out-File -encoding "UTF8" .\ffi-modules\${{ matrix.target }}\build.log
run: cargo build --release -p dnp3-ffi --no-default-features --features tls --target ${{ matrix.target }}
- name: Copy .dll
run: cp .\target\${{ matrix.target }}\release\dnp3_ffi.dll .\ffi-modules\${{ matrix.target }}
- name: Upload FFI modules
Expand Down Expand Up @@ -58,23 +56,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout DNP3
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: stepfunc/dnp3
ref: 1.5.2
ref: 1.6.0
- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
target: ${{ matrix.target }}
override: true
targets: ${{ matrix.target }}
- name: Install Rust Cross
run: cargo install cross
- name: Create FFI modules dir
run: mkdir -p ffi-modules/${{ matrix.target }}
- name: Build FFI
run: cross build --release -p dnp3-ffi --no-default-features --features tls --target ${{ matrix.target }} --message-format json > ffi-modules/${{ matrix.target }}/build.log
run: cross build --release -p dnp3-ffi --no-default-features --features tls --target ${{ matrix.target }}
- name: Copy .so
run: cp ./target/${{ matrix.target }}/release/libdnp3_ffi.so ./ffi-modules/${{ matrix.target }}
- name: Upload compiled FFI modules
Expand All @@ -88,42 +84,39 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true
- name: Checkout BOM tools repo
uses: actions/checkout@v3
with:
repository: stepfunc/bom-tools
ref: 0.1.0
path: bom-tools
- name: Install BOM tools
working-directory: bom-tools
run: cargo install --path bom-tools
- name: Install Cargo CycloneDx
run: cargo install cargo-cyclonedx
- name: Install custom allow-list tool
run: cargo install --git https://github.com/stepfunc/bom-tools.git
- name: Checkout DNP3
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: stepfunc/dnp3
ref: 1.5.2
ref: 1.6.0
- name: Download compiled FFI
uses: actions/download-artifact@v3
with:
name: ffi-modules
path: ffi-modules
- name: Create SBOMs
run: |
for dir in ffi-modules/*; do
target=`basename "${dir}"`
cargo cyclonedx -f json --no-default-features --features tls --target $target
mv ./ffi/dnp3-ffi/dnp3-ffi.cdx.json ffi-modules/$target
done
- name: Create FFI third-party-licenses.txt
run: bom-tools gen-licenses-dir ./ffi-modules build.log ./dep_config.json > third-party-licenses.txt
run: allow-list gen-licenses-dir -l ffi-modules -b dnp3-ffi.cdx.json -c allowed.json > third-party-licenses.txt
- name: Upload third-party-licenses.txt
uses: actions/upload-artifact@v3
with:
name: third-party-licenses
path: third-party-licenses.txt
- name: Package .NET bindings
uses: actions-rs/cargo@v1
with:
command: run
args: --bin dnp3-bindings -- --dotnet --package ./ffi-modules -o ./packaging.json -f third-party-licenses.txt
run: cargo run --bin dnp3-bindings -- --dotnet --package ./ffi-modules -o ./packaging.json -f third-party-licenses.txt
- name: Upload .NET bindings
uses: actions/upload-artifact@v3
with:
Expand Down
Loading