This repository has been archived by the owner on Jun 29, 2024. It is now read-only.
Dev #149
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build dll | |
on: | |
push: | |
branches: [staging,trying,dev,main] | |
# Remove the line above to run when pushing to master | |
pull_request: | |
branches: [ main, dev] | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
ci: | |
name: "build-ci-dll" | |
needs: ["build"] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Done | |
run: exit 0 | |
build: | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
profile: ["dev","release"] | |
feature: ["alloc std"] #"alloc" | |
target: [i686-pc-windows-msvc, i686-pc-windows-gnu ,x86_64-pc-windows-msvc, x86_64-pc-windows-gnu] | |
include: | |
- profile: "dev" | |
flag: "debug" | |
- profile: "release" | |
flag: "release" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: setup rust | |
uses: moonrepo/setup-rust@v1 | |
with: | |
cache-target: ${{ matrix.flag }} | |
targets: ${{ matrix.target }} | |
- name: install cbindgen | |
run: cargo install cbindgen | |
- name: build | |
run: cargo build --target ${{ matrix.target }} --profile ${{ matrix.profile }} --no-default-features --features '${{ matrix.feature }}' --package dll-inject | |
- name: generate bindings | |
working-directory: ./dll-inject | |
run: cbindgen --config cbindgen.toml --crate dll-inject --output dll-inject.h | |
- name: list dependencies | |
run: cargo rustc -p dll-inject --features '${{ matrix.feature }}' -- --print native-static-libs | |
- uses: actions/upload-artifact@v3 | |
name: upload artifact | |
with: | |
name: dll-inject-${{ matrix.target}}-${{ matrix.profile }}-${{ matrix.feature }} | |
path: | | |
dll-inject/dll-inject.h | |
target/${{ matrix.target }}/${{ matrix.flag }}/libdll_inject.* | |
target/${{ matrix.target }}/${{ matrix.flag }}/dll_inject.* |