some cleanup, add PKG_CONFIG_SYSROOT_DIR=/

This commit is contained in:
James Brumond 2023-11-03 19:08:19 -07:00
parent 0bbe32f178
commit 229a36ab28
Signed by: james
GPG Key ID: E8F2FC44BAA3357A
2 changed files with 4 additions and 12 deletions

View File

@ -1,12 +1,12 @@
ARG NODE_VERSION=20
ARG RUST_TOOLCHAIN=""
FROM node:${NODE_VERSION}
ENV CARGO_HOME=/usr/local/cargo
ENV RUSTUP_HOME=/usr/local/rustup
ENV PATH=/usr/local/cargo/bin:$PATH
ENV PKG_CONFIG_SYSROOT_DIR=/
RUN apt update && apt upgrade -y
RUN apt install -y g++-mingw-w64-x86-64 \
@ -22,13 +22,3 @@ ENV CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \
CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc \
CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++
RUN if test "${RUST_TOOLCHAIN}x" != "x" ; \
then rustup toolchain install $RUST_TOOLCHAIN ; \
fi
RUN rustup target add x86_64-pc-windows-gnu
RUN rustup target add x86_64-unknown-linux-gnu
RUN rustup target add armv7-unknown-linux-gnueabihf
RUN rustup target add aarch64-unknown-linux-gnu
RUN rustup target add wasm32-unknown-unknown

View File

@ -33,5 +33,7 @@ jobs:
uses: actions/checkout@v3
- name: Build
run: cargo build --target ${{ matrix.rust-target }}
run: |
rustup target add ${{ matrix.rust-target }}
cargo build --target ${{ matrix.rust-target }}
```