Skip to content

Commit

Permalink
Merge pull request #2 from stepfunc/prepare/1.6.0
Browse files Browse the repository at this point in the history
Prepare 1.6.0 release
  • Loading branch information
jadamcrain authored Jun 26, 2024
2 parents d267b4d + 7119229 commit e15c14f
Showing 1 changed file with 26 additions and 33 deletions.
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

0 comments on commit e15c14f

Please sign in to comment.