Skip to content
This repository has been archived by the owner on Jun 29, 2024. It is now read-only.

Commit

Permalink
Update to not require node 12
Browse files Browse the repository at this point in the history
  • Loading branch information
C0D3-M4513R committed Oct 14, 2023
1 parent 1b644e6 commit 57013dd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 36 deletions.
49 changes: 17 additions & 32 deletions .github/workflows/build-dll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,46 +26,31 @@ jobs:
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
- uses: actions-rs/toolchain@v1
- name: setup rust
uses: moonrepo/setup-rust@v1
with:
toolchain: stable
target: ${{ matrix.target }}
- uses: actions-rs/cargo@v1
with:
command: install
args: cbindgen
- uses: actions-rs/cargo@v1
with:
command: build
args: --target ${{ matrix.target }} --profile ${{ matrix.profile }} --no-default-features --features '${{ matrix.feature }}' --package dll-inject
cache-target: ${{ matrix.flag }}
targets: ${{ matrix.target }}
components: 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
uses: actions-rs/cargo@v1
with:
command: rustc
args: -p dll-inject --features '${{ matrix.feature }}' -- --print native-static-libs

- uses: actions/upload-artifact@v3
name: upload release artifact
if: ${{ matrix.profile == 'release' }}
with:
name: dll-inject-${{ matrix.target}}-release-${{ matrix.feature }}
path: |
dll-inject/dll-inject.h
target/${{ matrix.target }}/release/libdll_inject.*
target/${{ matrix.target }}/release/dll_inject.*
run: cargo rustc -p dll-inject --features '${{ matrix.feature }}' -- --print native-static-libs
- uses: actions/upload-artifact@v3
name: upload dev artifact
if: ${{ matrix.profile == 'dev' }}
name: upload artifact
with:
name: dll-inject-${{ matrix.target}}-dev-${{ matrix.feature }}
name: dll-inject-${{ matrix.target}}-${{ matrix.profile }}-${{ matrix.feature }}
path: |
dll-inject/dll-inject.h
target/${{ matrix.target }}/debug/dll_inject.*
target/${{ matrix.target }}/debug/libdll_inject.*
target/${{ matrix.target }}/${{ matrix.flag }}/libdll_inject.*
target/${{ matrix.target }}/${{ matrix.flag }}/dll_inject.*
7 changes: 3 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,11 @@ jobs:
target: [i686-pc-windows-msvc,x86_64-pc-windows-msvc]
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
- uses: moonrepo/setup-rust@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
override: true
target: ${{ matrix.target }}
channel: ${{ matrix.toolchain }}
targets: ${{ matrix.target }}
- uses: actions-rs/cargo@v1
with:
command: build
Expand Down

0 comments on commit 57013dd

Please sign in to comment.