Update docker-build-static.yml

This commit is contained in:
Dedy Martadinata S 2022-07-14 13:06:05 +07:00 committed by GitHub
parent da163368b0
commit 27eb62d1ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,7 +20,8 @@ env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
RUSTFLAGS: -Ctarget-feature=+crt-static RUSTFLAGS: -Ctarget-feature=+crt-static
OPENSSL_INCLUDE_DIR: "/usr/include/gnutls/" OPENSSL_INCLUDE_DIR: "/usr/include/gnutls/"
CARGO_HOME: ${GITHUB_WORKSPACE}/.cargo
# In total 5 jobs, all of the jobs are containerized # In total 5 jobs, all of the jobs are containerized
# --- # ---
@ -73,21 +74,20 @@ jobs:
- uses: actions/cache@v3 - uses: actions/cache@v3
with: with:
path: | path: |
/usr/local/cargo/bin .cargo/bin
/usr/local/cargo/registry/index .cargo/registry/index
/usr/local/cargo/registry/cache .cargo/registry/cache
/usr/local/cargo/git/db .cargo/git/db
target target
key: lldap-ui-static-${{ hashFiles('**/Cargo.lock') }} key: lldap-ui-static-${{ hashFiles('**/Cargo.lock') }}
restore-keys: | restore-keys: |
lldap-ui-static- lldap-ui-static-
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v2
# Prevent install error on existing cached - name: install rollup wasm-pack nodejs
- name: install cargo wasm run: |
run: cargo install wasm-pack || true npm install -g rollup
- name: install rollup nodejs npm install -g wasm-pack
run: npm install -g rollup
- name: build frontend - name: build frontend
run: ./app/build.sh run: ./app/build.sh
- name: check path - name: check path
@ -104,8 +104,7 @@ jobs:
image: rust:1.61 image: rust:1.61
env: env:
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc
OPENSSL_LIB_DIR: "/usr/lib/arm-linux-gnueabihf/" OPENSSL_LIB_DIR: "/usr/lib/arm-linux-gnueabihf/"
CARGO_HOME: ${GITHUB_WORKSPACE}/.cargo
steps: steps:
- name: add armhf architecture - name: add armhf architecture
run: dpkg --add-architecture armhf run: dpkg --add-architecture armhf
@ -153,8 +152,6 @@ jobs:
env: env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
OPENSSL_LIB_DIR: "/usr/lib/aarch64-linux-gnu/" OPENSSL_LIB_DIR: "/usr/lib/aarch64-linux-gnu/"
RUSTFLAGS: -Ctarget-feature=+crt-static
CARGO_HOME: ${GITHUB_WORKSPACE}/.cargo
steps: steps:
- name: add arm64 architecture - name: add arm64 architecture
run: dpkg --add-architecture arm64 run: dpkg --add-architecture arm64
@ -202,8 +199,6 @@ jobs:
image: rust:1.61 image: rust:1.61
env: env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
RUSTFLAGS: -Ctarget-feature=+crt-static
CARGO_HOME: ${GITHUB_WORKSPACE}/.cargo
steps: steps:
- name: install runtime - name: install runtime
run: apt update && apt install -y gcc-x86-64-linux-gnu g++-x86-64-linux-gnu libc6-dev libgnutls28-dev tar run: apt update && apt install -y gcc-x86-64-linux-gnu g++-x86-64-linux-gnu libc6-dev libgnutls28-dev tar