Skip to content

Commit 15993c2

Browse files
authored
feat: support test_local
1 parent ba6cd44 commit 15993c2

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

.github/workflows/test_local.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: validate_local
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
- master
9+
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
generate:
15+
runs-on: ubuntu-22.04
16+
continue-on-error: true
17+
strategy:
18+
matrix:
19+
target: ["x86_64-pc-windows-gnu", "x86_64-unknown-linux-musl", "aarch64-apple-darwin"]
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
token: ${{ secrets.GITHUB_TOKEN }}
26+
submodules: recursive
27+
28+
- name: Authorize Git
29+
run: |
30+
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
31+
git config --global user.name "$GITHUB_ACTOR"
32+
33+
- name: Update submodule
34+
run: |
35+
git submodule update --init --recursive -f
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
39+
- name: Build for ${{matrix.target}})
40+
shell: 'script --return --quiet --log-out /dev/null --command "bash -e {0}"'
41+
run: |
42+
docker run -v $(pwd):/root/src ghcr.io/chainreactors/malefic-builder:latest \
43+
bash -c "cargo build --release -p malefic-mutant && ./target/release/malefic-mutant generate beacon && ./target/release/malefic-mutant build malefic --target ${{matrix.target}}"
44+
45+
- name: Build completed
46+
run: |
47+
echo "Build for ${{matrix.target}} completed successfully"

0 commit comments

Comments
 (0)