-
Notifications
You must be signed in to change notification settings - Fork 1
88 lines (84 loc) · 2.77 KB
/
deploy.yml
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
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Deploy to memflow registry
on:
push:
branches:
- "**"
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
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-20.04
target: x86_64-unknown-linux-gnu
extension: "*.so"
- os_name: Linux-aarch64
os: ubuntu-20.04
target: aarch64-unknown-linux-gnu
extension: "*.so"
- os_name: Linux-arm
os: ubuntu-20.04
target: arm-unknown-linux-gnueabi
extension: "*.so"
- os_name: Linux-i686
os: ubuntu-20.04
target: i686-unknown-linux-gnu
extension: "*.so"
skip_tests: true
- os_name: Windows-aarch64
os: windows-latest
target: aarch64-pc-windows-msvc
extension: "*.dll"
skip_tests: true
- os_name: Windows-i686
os: windows-latest
target: i686-pc-windows-msvc
extension: "*.dll"
skip_tests: true
- os_name: Windows-x86_64
os: windows-latest
target: x86_64-pc-windows-msvc
extension: "*.dll"
- os_name: macOS-x86_64
os: macOS-latest
target: x86_64-apple-darwin
extension: "*.dylib"
- os_name: macOS-aarch64
os: macOS-latest
target: aarch64-apple-darwin
extension: "*.dylib"
toolchain:
- stable
steps:
- uses: actions/checkout@v4
- name: Cache cargo & target directories
uses: Swatinem/rust-cache@v2
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: "build"
target: ${{ matrix.platform.target }}
toolchain: ${{ matrix.toolchain }}
args: "--locked --release"
strip: true
- name: Run tests
uses: houseabsolute/actions-rust-cross@v0
with:
command: "test"
target: ${{ matrix.platform.target }}
toolchain: ${{ matrix.toolchain }}
args: "--locked --release"
if: ${{ !matrix.platform.skip_tests }}
- 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
run: |
cd target/${{ matrix.platform.target }}/release
memflowup --skip-version-check push --token ${{ secrets.MEMFLOW_REGISTRY_TOKEN }} --priv-key ec-secp256k1-priv-key.pem ${{ matrix.extension }}