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 2b11528
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 56 deletions.
50 changes: 18 additions & 32 deletions .github/workflows/build-dll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,46 +26,32 @@ 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 }}
- 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
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.*
51 changes: 27 additions & 24 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,44 +24,47 @@ jobs:
strategy:
fail-fast: false
matrix:
args: [-v] #--release -v,
profile: [ "dev","release" ]
toolchain: ["beta","stable"]
features: ['"alloc"','"alloc std"','"alloc x86tox64"','"alloc x86tox64 std"']
target: [i686-pc-windows-msvc,x86_64-pc-windows-msvc]
include:
- profile: "dev"
flag: "debug"
- profile: "release"
flag: "release"
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
- uses: moonrepo/setup-rust@v1
with:
cache-target: ${{ matrix.flag }}
profile: minimal
toolchain: ${{ matrix.toolchain }}
override: true
target: ${{ matrix.target }}
- uses: actions-rs/cargo@v1
with:
command: build
args: ${{ matrix.args }} --no-default-features --features ${{ matrix.features }} --target ${{ matrix.target }} --package inject-lib
- uses: actions-rs/cargo@v1
with:
command: test
args: ${{ matrix.args }} --no-default-features --features ${{ matrix.features }} --target ${{ matrix.target }} --package inject-lib
channel: ${{ matrix.toolchain }}
targets: ${{ matrix.target }}
- name: build
run: cargo build --no-default-features --profile ${{ matrix.profile }} --features ${{ matrix.features }} --target ${{ matrix.target }} --package inject-lib
- name: test
run: cargo test --no-default-features --profile ${{ matrix.profile }} --features ${{ matrix.features }} --target ${{ matrix.target }} --package inject-lib

build-ubuntu:
name: "build-ubuntu"
runs-on: ubuntu-latest
strategy:
matrix:
args: [-v] #--release -v,
profile: [ "dev","release" ]
toolchain: [stable]
include:
- profile: "dev"
flag: "debug"
- profile: "release"
flag: "release"
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
- uses: actions-rs/cargo@v1
with:
command: build
args: ${{ matrix.args }} --no-default-features --features "ntdll alloc" --package inject-lib
- uses: actions-rs/cargo@v1
- uses: moonrepo/setup-rust@v1
with:
command: test
args: ${{ matrix.args }} --no-default-features --features "ntdll alloc" --package inject-lib
cache-target: ${{ matrix.flag }}
channel: ${{ matrix.toolchain }}
- name: build
run: cargo build ${{ matrix.args }} --profile ${{ matrix.profile }} --no-default-features --features "ntdll alloc" --package inject-lib
- name: test
run: cargo test ${{ matrix.args }} --profile ${{ matrix.profile }} --no-default-features --features "ntdll alloc" --package inject-lib

0 comments on commit 2b11528

Please sign in to comment.