Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
kulukami committed Sep 25, 2023
1 parent a8d32d4 commit 4fa9e2f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
6 changes: 0 additions & 6 deletions plugins/scanner/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,3 @@ linker = "/opt/x86_64-linux-musl/bin/x86_64-linux-musl-g++"
[target."aarch64-unknown-linux-musl"]
rustflags = ["-C", "linker-flavor=gcc", "-C", "link-self-contained=on"]
linker = "/opt/aarch64-linux-musl/bin/aarch64-linux-musl-g++"

[source.crates-io]
replace-with = 'rsproxy'

[source.rsproxy]
registry = "https://rsproxy.cn/crates.io-index"
8 changes: 4 additions & 4 deletions plugins/scanner/docker/build_linux_aarch64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ mv /LibClamavDocker/clamav .
mv /LibClamavDocker/clamav-mussels-cookbook .
mv /LibClamavDocker/lib .
mv /LibClamavDocker/include .
rustup target add x86_64-unknown-linux-musl
rustup target add aarch64-unknown-linux-musl

CC="x86_64-linux-musl-gcc" CXX="x86_64-linux-musl-c++" RUSTFLAGS='-C target-feature=+crt-static' cargo build --release --bin scanner_plugin --target x86_64-unknown-linux-musl
CC="aarch64-linux-musl-gcc" CXX="aarch64-linux-musl-c++" RUSTFLAGS='-C target-feature=+crt-static' cargo build --release --bin scanner_plugin --target aarch64-unknown-linux-musl

mkdir -p output/tmp
cp -r tools/* ./output/.
cp settings.toml ./output/.

cp target/x86_64-unknown-linux-musl/release/scanner_plugin output/scanner
cp target/aarch64-unknown-linux-musl/release/scanner_plugin output/scanner
strip output/scanner

wget http://lf9-elkeid.bytetos.com/obj/elkeid-download/18249e0cbe7c6aca231f047cb31d753fa4604434fcb79f484ea477f6009303c3/archive_db_default_20221206.zip
mv archive_db_default_20221206.zip ./output/tmp

cd output && tar zcvf scanner-x86_64.tar.gz scanner tmp elkeid_targets settings.toml && cd -
cd output && tar zcvf scanner-aarch64.tar.gz scanner tmp elkeid_targets settings.toml && cd -
8 changes: 4 additions & 4 deletions plugins/scanner/docker/build_linux_x86_64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ mv /LibClamavDocker/clamav .
mv /LibClamavDocker/clamav-mussels-cookbook .
mv /LibClamavDocker/lib .
mv /LibClamavDocker/include .
rustup target add aarch64-unknown-linux-musl
rustup target add x86_64-unknown-linux-musl

CC="aarch64-linux-musl-gcc" CXX="aarch64-linux-musl-c++" RUSTFLAGS='-C target-feature=+crt-static' cargo build --release --bin scanner_plugin --target aarch64-unknown-linux-musl
CC="x86_64-linux-musl-gcc" CXX="x86_64-linux-musl-c++" RUSTFLAGS='-C target-feature=+crt-static' cargo build --release --bin scanner_plugin --target x86_64-unknown-linux-musl

mkdir -p output/tmp
cp -r tools/* ./output/.
cp settings.toml ./output/.

cp target/aarch64-unknown-linux-musl/release/scanner_plugin output/scanner
cp target/x86_64-unknown-linux-musl/release/scanner_plugin output/scanner
strip output/scanner

wget http://lf9-elkeid.bytetos.com/obj/elkeid-download/18249e0cbe7c6aca231f047cb31d753fa4604434fcb79f484ea477f6009303c3/archive_db_default_20221206.zip
mv archive_db_default_20221206.zip ./output/tmp

cd output && tar zcvf scanner-aarch64.tar.gz scanner tmp elkeid_targets settings.toml && cd -
cd output && tar zcvf scanner-x86_64.tar.gz scanner tmp elkeid_targets settings.toml && cd -

0 comments on commit 4fa9e2f

Please sign in to comment.