-
Notifications
You must be signed in to change notification settings - Fork 577
72 lines (67 loc) · 2.51 KB
/
agent-release-artifacts.yml
File metadata and controls
72 lines (67 loc) · 2.51 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
name: Agent Release Artifacts
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
group: agent-release-artifacts-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
jobs:
build:
# Only run for agents-v* tags
if: startsWith(github.ref_name, 'agents-v')
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- TARGET: x86_64-unknown-linux-gnu
OS: depot-ubuntu-24.04-8
- TARGET: x86_64-apple-darwin
OS: depot-macos-15
- TARGET: aarch64-apple-darwin
OS: depot-macos-15
runs-on: ${{ matrix.OS }}
steps:
- name: checkout
uses: actions/checkout@v6
- name: ubuntu setup
if: ${{ matrix.OS == 'depot-ubuntu-24.04-8' }}
run: |
sudo apt-get update -qq
sudo apt-get install -qq crossbuild-essential-arm64 crossbuild-essential-armhf
# some additional configuration for cross-compilation on linux
cat >>~/.cargo/config <<EOF
[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"
[target.aarch64-unknown-linux-musl]
linker = "aarch64-linux-gnu-gcc"
EOF
- name: setup rust
uses: dtolnay/rust-toolchain@stable
with:
target: ${{ matrix.TARGET }}
- name: setup target
run: rustup target add ${{ matrix.TARGET }}
working-directory: ./rust/main
- name: build
run: cargo build --release --target ${{ matrix.TARGET }} --bin relayer --bin scraper --bin validator
working-directory: ./rust/main
- name: make executable
if: ${{ matrix.OS == 'depot-ubuntu-24.04-8' || matrix.OS == 'depot-macos-15' }}
run: chmod ug+x,-w relayer scraper validator
working-directory: rust/main/target/${{ matrix.TARGET }}/release
- name: upload binaries
uses: actions/upload-artifact@v5
with:
name: ${{ matrix.TARGET }}-${{ github.ref_name }}
path: |
rust/main/target/${{ matrix.TARGET }}/release/relayer
rust/main/target/${{ matrix.TARGET }}/release/relayer.exe
rust/main/target/${{ matrix.TARGET }}/release/scraper
rust/main/target/${{ matrix.TARGET }}/release/scraper.exe
rust/main/target/${{ matrix.TARGET }}/release/validator
rust/main/target/${{ matrix.TARGET }}/release/validator.exe
if-no-files-found: error