Skip to content

Commit 4a6ce86

Browse files
committed
Support Github Action
1 parent 3be387f commit 4a6ce86

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

.github/workflows/generate.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ jobs:
4747
matrix:
4848
target: ${{ fromJson(needs.set_targets.outputs.targets_json) }}
4949
steps:
50+
- name: Install Cargo make
51+
run: cargo install --force cargo-make
52+
5053
- name: Checkout code
5154
uses: actions/checkout@v4
5255
with:
@@ -61,20 +64,14 @@ jobs:
6164
- name: Generate config.yaml
6265
run: echo "$SECRET_CONFIG_CONTENT" | base64 -d > config.yaml
6366

64-
- name: Install Cross
65-
run: |
66-
cargo install cross --git https://github.com/cross-rs/cross
67-
68-
- name: Config malefic
69-
run: |
70-
cargo run --release -p malefic-config ${{ github.event.inputs.edition }}
71-
7267
- name: Build ${{matrix.target}}
73-
run: cross build --release -p malefic --target ${{matrix.target}}
68+
shell: 'script --return --quiet --log-out /dev/null --command "bash -e {0}"'
69+
run: cargo make docker ${{matrix.target}}
7470

7571
- name: Rename binary for ${{matrix.target}}
7672
run: |
7773
mkdir -p output/
74+
sudo chmod -R 777 target
7875
if [[ -f target/${{matrix.target}}/release/malefic ]]; then
7976
mv target/${{matrix.target}}/release/malefic output/malefic-${{matrix.target}}
8077
else

Makefile.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ NAME_SPACE = "ghcr.io/chainreactors"
1313
RUST_TOOLCHAIN = "nightly-2024-08-16-latest"
1414
[tasks.set-env]
1515
env.RUSTFLAGS="""-A warnings \
16-
-A unused_variables \
1716
--remap-path-prefix=${CARGO_HOME}=. \
1817
--remap-path-prefix=${HOME}=. \
1918
--remap-path-prefix=malefic-modules=. \

0 commit comments

Comments
 (0)