Fix: use full paths for cargo to work across all build steps
Some checks failed
GBCI / build (push) Failing after 17s
Some checks failed
GBCI / build (push) Failing after 17s
This commit is contained in:
parent
94df8d52cb
commit
d5bac09816
1 changed files with 11 additions and 13 deletions
|
|
@ -6,6 +6,10 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: ["main"]
|
branches: ["main"]
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_HOME: /root/.cargo
|
||||||
|
PATH: /root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: gbo
|
runs-on: gbo
|
||||||
|
|
@ -33,10 +37,10 @@ jobs:
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
run: |
|
run: |
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||||
source ~/.cargo/env
|
echo "/root/.cargo/bin" >> $GITHUB_PATH
|
||||||
rustup target add x86_64-unknown-linux-gnu
|
/root/.cargo/bin/rustup target add x86_64-unknown-linux-gnu
|
||||||
rustup target add aarch64-unknown-linux-gnu
|
/root/.cargo/bin/rustup target add aarch64-unknown-linux-gnu
|
||||||
rustup target add x86_64-pc-windows-gnu
|
/root/.cargo/bin/rustup target add x86_64-pc-windows-gnu
|
||||||
|
|
||||||
- name: Install cross-compilation dependencies
|
- name: Install cross-compilation dependencies
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -51,23 +55,17 @@ jobs:
|
||||||
sudo cp /opt/gbo/bin/system/botui.env .env
|
sudo cp /opt/gbo/bin/system/botui.env .env
|
||||||
|
|
||||||
- name: Build Linux x86_64
|
- name: Build Linux x86_64
|
||||||
run: |
|
run: /root/.cargo/bin/cargo build --locked --release --target x86_64-unknown-linux-gnu
|
||||||
source ~/.cargo/env
|
|
||||||
cargo build --locked --release --target x86_64-unknown-linux-gnu
|
|
||||||
|
|
||||||
- name: Build Linux ARM64
|
- name: Build Linux ARM64
|
||||||
env:
|
env:
|
||||||
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
|
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
|
||||||
run: |
|
run: /root/.cargo/bin/cargo build --locked --release --target aarch64-unknown-linux-gnu
|
||||||
source ~/.cargo/env
|
|
||||||
cargo build --locked --release --target aarch64-unknown-linux-gnu
|
|
||||||
|
|
||||||
- name: Build Windows x86_64
|
- name: Build Windows x86_64
|
||||||
env:
|
env:
|
||||||
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER: x86_64-w64-mingw32-gcc
|
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER: x86_64-w64-mingw32-gcc
|
||||||
run: |
|
run: /root/.cargo/bin/cargo build --locked --release --target x86_64-pc-windows-gnu
|
||||||
source ~/.cargo/env
|
|
||||||
cargo build --locked --release --target x86_64-pc-windows-gnu
|
|
||||||
|
|
||||||
- name: Organize release artifacts
|
- name: Organize release artifacts
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue