some cleanup

This commit is contained in:
Dedy Martadinata Supriyadi 2022-08-01 19:50:45 +07:00 committed by nitnelave
parent e6ae726304
commit b413935932
3 changed files with 18 additions and 40 deletions

View File

@ -48,10 +48,13 @@ env:
# 1-bullseye, 1.61-bullseye, 1.61.0-bullseye, bullseye, 1, 1.61, 1.61.0, latest
# cache
## .sccache
## cargo
## target
# Github actions currently timeout when downloading musl-gcc
## Using lldap dev image based on rust:1.62-slim-bullseye and musl-gcc bundled
### Job aarch64 and amd64 build
jobs:
build-ui:
runs-on: ubuntu-latest
@ -60,7 +63,6 @@ jobs:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -Ctarget-feature=+crt-static
#CARGO_HOME: ${GITHUB_WORKSPACE}/.cargo
steps:
- name: install runtime
run: apt update && apt install -y gcc-x86-64-linux-gnu g++-x86-64-linux-gnu libc6-dev ca-certificates
@ -150,9 +152,9 @@ jobs:
build-aarch64:
runs-on: ubuntu-latest
container:
image: rust:1.62
#image: rust:1.62
image: martadinata666/debian:rust-dev
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER: aarch64-linux-musl-gcc
CARGO_TERM_COLOR: always
RUSTFLAGS: -Ctarget-feature=+crt-static
@ -176,13 +178,11 @@ jobs:
key: lldap-bin-aarch64-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
lldap-bin-aarch64-
- name: fetch musl-gcc
run: |
wget -c https://musl.cc/aarch64-linux-musl-cross.tgz
tar zxf ./x86_64-linux-musl-cross.tgz -C /opt
echo "/opt/aarch64-linux-musl-cross:/opt/aarch64-linux-musl-cross/bin" >> $GITHUB_PATH
# - name: build
# run: ./build-arm64.sh
# - name: fetch musl-gcc
# run: |
# wget -c https://musl.cc/aarch64-linux-musl-cross.tgz
# tar zxf ./x86_64-linux-musl-cross.tgz -C /opt
# echo "/opt/aarch64-linux-musl-cross:/opt/aarch64-linux-musl-cross/bin" >> $GITHUB_PATH
- name: add musl aarch64 target
run: rustup target add aarch64-unknown-linux-musl
- name: build lldap aarch4
@ -203,7 +203,8 @@ jobs:
build-amd64:
runs-on: ubuntu-latest
container:
image: rust:1.62
# image: rust:1.62
image: martadinata666/debian:rust-dev
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -Ctarget-feature=+crt-static
@ -225,13 +226,11 @@ jobs:
lldap-bin-amd64-
- name: install musl
run: apt update && apt install -y musl-tools tar wget
- name: fetch musl-gcc
run: |
wget -c https://musl.cc/x86_64-linux-musl-cross.tgz
tar zxf ./x86_64-linux-musl-cross.tgz -C /opt
echo "/opt/x86_64-linux-musl-cross:/opt/x86_64-linux-musl-cross/bin" >> $GITHUB_PATH
# - name: fetch musl gcc and build
# run: ./build-amd64.sh
# - name: fetch musl-gcc
# run: |
# wget -c https://musl.cc/x86_64-linux-musl-cross.tgz
# tar zxf ./x86_64-linux-musl-cross.tgz -C /opt
# echo "/opt/x86_64-linux-musl-cross:/opt/x86_64-linux-musl-cross/bin" >> $GITHUB_PATH
- name: add x86_64 target
run: rustup target add x86_64-unknown-linux-musl
- name: build x86_64 lldap

View File

@ -1,10 +0,0 @@
#!/bin/bash
wget -c https://musl.cc/x86_64-linux-musl-cross.tgz
tar zxf ./x86_64-linux-musl-cross.tgz -C /opt
rm ./x86_64-linux-musl-cross.tgz
export RUST_BACKTRACE=1
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER=x86_64-linux-musl-gcc
export RUSTFLAGS="-Ctarget-feature=+crt-static"
export PATH="/opt/x86_64-linux-musl-cross/:/opt/x86_64-linux-musl-cross/bin/:$PATH"
rustup target add x86_64-unknown-linux-musl
cargo build --target=x86_64-unknown-linux-musl --release -p lldap -p migration-tool

View File

@ -1,11 +0,0 @@
#!/bin/bash
wget -c https://musl.cc/aarch64-linux-musl-cross.tgz
tar zxf ./aarch64-linux-musl-cross.tgz -C /opt
rm ./aarch64-linux-musl-cross.tgz
export RUST_BACKTRACE=1
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-musl-gcc
export RUSTFLAGS="-Ctarget-feature=+crt-static"
export PATH="/opt/aarch64-linux-musl-cross/:/opt/aarch64-linux-musl-cross/bin/:$PATH"
rustup target add aarch64-unknown-linux-musl
cargo build --target=aarch64-unknown-linux-musl --release -p lldap -p migration-tool