-
Notifications
You must be signed in to change notification settings - Fork 5
75 lines (69 loc) · 2.86 KB
/
Copy pathdeploy.yml
File metadata and controls
75 lines (69 loc) · 2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Deploy to memflow registry
on:
push:
branches:
- "**"
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
PLUGIN_NAME: pcileech
jobs:
deploy:
name: ${{ matrix.platform.os_name }} with rust ${{ matrix.toolchain }}
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
- os_name: linux-x86_64
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os_name: windows-x86_64
os: windows-latest
target: x86_64-pc-windows-msvc
- os_name: macOS-x86_64
os: macOS-latest
target: x86_64-apple-darwin
- os_name: macOS-aarch64
os: macOS-latest
target: aarch64-apple-darwin
toolchain:
- stable
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Cache cargo & target directories
uses: Swatinem/rust-cache@v2
- name: install libusb-1.0
run: sudo apt-get install libusb-1.0-0-dev
if: matrix.platform.os == 'ubuntu-latest'
- name: install llvm and clang
uses: KyleMayes/install-llvm-action@v1
with:
version: "10.0"
directory: ${{ runner.temp }}/llvm
if: matrix.platform.os == 'windows-latest'
- name: set LIBCLANG_PATH
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
if: matrix.platform.os == 'windows-latest'
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: "build"
target: ${{ matrix.platform.target }}
toolchain: ${{ matrix.toolchain }}
args: "--locked --release --all-features"
strip: false
- name: Install memflowup
run: cargo install --git https://github.com/memflow/memflowup
- run: echo "${{ secrets.MEMFLOW_REGISTRY_SIGNING_KEY}}" > ec-secp256k1-priv-key.pem
- name: Upload plugin (linux)
run: memflowup --skip-version-check push --token ${{ secrets.MEMFLOW_REGISTRY_TOKEN }} --priv-key ec-secp256k1-priv-key.pem --file target/${{ matrix.platform.target }}/release/libmemflow_${{ env. PLUGIN_NAME}}.so
if: matrix.platform.os == 'ubuntu-latest'
- name: Upload plugin (windows)
run: memflowup --skip-version-check push --token ${{ secrets.MEMFLOW_REGISTRY_TOKEN }} --priv-key ec-secp256k1-priv-key.pem --file target/${{ matrix.platform.target }}/release/memflow_${{ env. PLUGIN_NAME}}.dll
if: matrix.platform.os == 'windows-latest'
- name: Upload plugin (mac)
run: memflowup --skip-version-check push --token ${{ secrets.MEMFLOW_REGISTRY_TOKEN }} --priv-key ec-secp256k1-priv-key.pem --file target/${{ matrix.platform.target }}/release/libmemflow_${{ env. PLUGIN_NAME}}.dylib
if: matrix.platform.os == 'macOS-latest'