55 tags :
66 - " *"
77jobs :
8- build :
8+ build_x86 :
99 permissions :
1010 contents : write
1111 continue-on-error : false
1212 runs-on : ubuntu-latest
1313 steps :
1414 - name : Checkout
1515 uses : actions/checkout@v4
16+ - uses : cargo-bins/cargo-binstall@main
17+ - uses : dtolnay/rust-toolchain@stable
18+ with :
19+ toolchain : nightly
20+ components : clippy rustfmt
1621
17- - uses : taiki-e/install-action@just
22+ - name : Install the dependencies
23+ run : |
24+ sudo apt update
25+ sudo apt install -y protobuf-compiler
26+ cargo binstall -y bpf-linker
27+
28+ - name : Build tamanoir-ebpf
29+ run : cd tamanoir-ebpf && cargo build --release
1830
19- - uses : cargo-bins/cargo-binstall@main
31+ - name : Build tamanoir for x86_64
32+ run : |
33+ cargo build -p tamanoir --target x86_64-unknown-linux-gnu --release
34+ cp target/x86_64-unknown-linux-gnu/release/tamanoir tamanoir-x86_64
2035
36+ - name : Build tamanoir-c2 for x86_64
37+ run : |
38+ cargo build -p tamanoir-c2 --target x86_64-unknown-linux-gnu --release
39+ cp target/x86_64-unknown-linux-gnu/release/tamanoir-c2 tamanoir-c2-x86_64
40+
41+ - name : Build tamanoir-tui for x86_64
42+ run : |
43+ cargo build -p tamanoir-tui --target x86_64-unknown-linux-gnu --release
44+ cp target/x86_64-unknown-linux-gnu/release/tamanoir-tui tamanoir-tui-x86_64
45+
46+ - name : Build hello-world shellcodes for x86_64
47+ run : |
48+ ./tamanoir-c2-x86_64 rce build -c ./assets/payloads/hello -t x86_64
49+ ./tamanoir-c2-x86_64 rce build -c ./assets/payloads/xeyes -t x86_64
50+ cp $HOME/.tamanoir/bins/tamanoir-rce-hello_x86_64.bin tamanoir-rce-hello_x86_64.bin
51+ cp $HOME/.tamanoir/bins/tamanoir-rce-xeyes_x86_64.bin tamanoir-rce-xeyes_x86_64.bin
52+
53+ - name : Persist artifacts
54+ uses : actions/upload-artifact@v4
55+ with :
56+ name : x86-artifacts
57+ path : |
58+ tamanoir-x86_64
59+ tamanoir-c2-x86_64
60+ tamanoir-tui-x86_64
61+ tamanoir-rce-hello_x86_64.bin
62+ tamanoir-rce-xeyes_x86_64.bin
63+
64+ build_arm :
65+ permissions :
66+ contents : write
67+ continue-on-error : false
68+ runs-on : ubuntu-24.04-arm
69+ steps :
70+ - name : Checkout
71+ uses : actions/checkout@v4
2172 - uses : dtolnay/rust-toolchain@stable
2273 with :
2374 toolchain : nightly
@@ -26,36 +77,68 @@ jobs:
2677 - name : Install the dependencies
2778 run : |
2879 sudo apt update
29- sudo apt install -y podman binutils-aarch64-linux-gnu musl-tools
30- cargo binstall -y cross
31- cargo binstall -y bpf-linker
80+ sudo apt install -y protobuf-compiler
81+ cargo install bpf-linker
82+
3283
3384 - name : Build tamanoir-ebpf
34- run : just build -ebpf
85+ run : cd tamanoir -ebpf && cargo build --release
3586
36- - name : Build tamanoir-proxy for arm64 musl
87+ - name : Build tamanoir for arm64
3788 run : |
38- CROSS_CONTAINER_ENGINE=podman cross build -p tamanoir-proxy --target aarch64-unknown-linux-musl --release
39- cp target/aarch64-unknown-linux-musl /release/tamanoir tamanoir-aarch64-unknown-linux-musl
89+ cargo build -p tamanoir --target aarch64-unknown-linux-gnu --release
90+ cp target/aarch64-unknown-linux-gnu /release/tamanoir tamanoir-aarch64
4091
41- - name : Build tamanoir-proxy for x86_64 musl
92+ - name : Build tamanoir-C2 for arm64
4293 run : |
43- CROSS_CONTAINER_ENGINE=podman cross build -p tamanoir-proxy --target x86_64 -unknown-linux-musl --release
44- cp target/x86_64 -unknown-linux-musl /release/tamanoir tamanoir-x86_64-unknown-linux-musl
94+ cargo build -p tamanoir-c2 --target aarch64 -unknown-linux-gnu --release
95+ cp target/aarch64 -unknown-linux-gnu /release/tamanoir-c2 tamanoir-c2-aarch64
4596
46- - name : Build tamanoir for arm64 musl
97+ - name : Build tamanoir-tui for arm64
4798 run : |
48- CROSS_CONTAINER_ENGINE=podman cross build -- target aarch64-unknown-linux-musl --release
49- cp target/aarch64-unknown-linux-musl /release/tamanoir tamanoir-aarch64-unknown-linux-musl
99+ cargo build -p tamanoir-tui -- target aarch64-unknown-linux-gnu --release
100+ cp target/aarch64-unknown-linux-gnu /release/tamanoir-tui tamanoir-tui-aarch64
50101
51- - name : Build tamanoir for x86_64 musl
102+ - name : Build hello-world shellcodes for arm64
52103 run : |
53- CROSS_CONTAINER_ENGINE=podman cross build --target x86_64-unknown-linux-musl --release
54- cp target/x86_64-unknown-linux-musl/release/tamanoir tamanoir-x86_64-unknown-linux-musl
104+ ./tamanoir-c2-aarch64 rce build -c ./assets/payloads/hello -t aarch64
105+ ./tamanoir-c2-aarch64 rce build -c ./assets/payloads/xeyes -t aarch64
106+ cp $HOME/.tamanoir/bins/tamanoir-rce-hello_aarch64.bin tamanoir-rce-hello_aarch64.bin
107+ cp $HOME/.tamanoir/bins/tamanoir-rce-xeyes_aarch64.bin tamanoir-rce-xeyes_aarch64.bin
108+
109+ - name : Persist artifacts
110+ uses : actions/upload-artifact@v4
111+ with :
112+ name : arch-artifacts
113+ path : |
114+ tamanoir-aarch64
115+ tamanoir-c2-aarch64
116+ tamanoir-tui-aarch64
117+ tamanoir-rce-hello_aarch64.bin
118+ tamanoir-rce-xeyes_aarch64.bin
55119
56- - name : Upload Binary
120+ release :
121+ permissions :
122+ contents : write
123+ continue-on-error : false
124+ needs : [build_x86,build_arm]
125+ runs-on : ubuntu-latest
126+ steps :
127+ - name : Checkout
128+ uses : actions/checkout@v4
129+ - name : Download artifacts
130+ uses : actions/download-artifact@v4
131+ with :
132+ path : release-assets
133+ - name : test
134+ run : ls -lhR
135+ - name : Upload Binaries
57136 uses : softprops/action-gh-release@v2
137+ if-no-files-found : error
58138 with :
59- files : " tamanoir*"
139+ files : |
140+ "release-assets/**/*"
60141 body : |
61142 [Release.md](${{ github.server_url }}/${{ github.repository }}/blob/main/Release.md)
143+
144+
0 commit comments