From 52fc9a6aefebecc276795af24614930736d4a645 Mon Sep 17 00:00:00 2001 From: "sijie.sun" Date: Fri, 10 Jan 2025 20:56:16 +0800 Subject: [PATCH] 'tmp' --- .github/workflows/core.yml | 5 ++++- .github/workflows/gui.yml | 9 +++++++++ .github/workflows/install_rust.sh | 8 ++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index 8d655ca..2f30860 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -117,7 +117,10 @@ jobs: if: ${{ ! endsWith(matrix.TARGET, 'freebsd') }} run: | bash ./.github/workflows/install_rust.sh - if [[ $OS =~ ^ubuntu.*$ && $TARGET =~ ^mips.*$ ]]; then + + if [[ $$TARGET == "x86_64-win7-windows-msvc" || $TARGET == "i686-win7-windows-msvc" ]]; then + cargo +nightly build --release -Z build-std --target $TARGET + elif [[ $OS =~ ^ubuntu.*$ && $TARGET =~ ^mips.*$ ]]; then cargo +nightly build -r --verbose --target $TARGET -Z build-std=std,panic_abort --no-default-features --features mips --package=easytier else cargo build --release --verbose --target $TARGET diff --git a/.github/workflows/gui.yml b/.github/workflows/gui.yml index 60e184a..9b4a373 100644 --- a/.github/workflows/gui.yml +++ b/.github/workflows/gui.yml @@ -166,11 +166,20 @@ jobs: - name: Build GUI uses: tauri-apps/tauri-action@v0 + if: ${{ ! contains(matrix.TARGET, 'win7') }} with: projectPath: ./easytier-gui # https://tauri.app/v1/guides/building/linux/#cross-compiling-tauri-applications-for-arm-based-devices args: --verbose --target ${{ matrix.TARGET }} ${{ matrix.OS == 'ubuntu-22.04' && contains(matrix.TARGET, 'aarch64') && '--bundles deb' || '' }} + - name: Build GUI (Windows 7) + uses: tauri-apps/tauri-action@v0 + if: ${{ contains(matrix.TARGET, 'win7') }} + with: + projectPath: ./easytier-gui + # https://tauri.app/v1/guides/building/linux/#cross-compiling-tauri-applications-for-arm-based-devices + args: --verbose --release -Z build-std --target ${{ matrix.TARGET }} + - name: Compress run: | mkdir -p ./artifacts/objects/ diff --git a/.github/workflows/install_rust.sh b/.github/workflows/install_rust.sh index c0205ce..8a945cb 100644 --- a/.github/workflows/install_rust.sh +++ b/.github/workflows/install_rust.sh @@ -5,6 +5,14 @@ # - GUI_TARGET # - OS +if [[ $$TARGET == "x86_64-win7-windows-msvc" || $TARGET == "i686-win7-windows-msvc" ]]; then + rustup set auto-self-update disable + rustup toolchain install nightly + rustup component add rust-src --toolchain nightly + rustup default nightly + exit 0 +fi + # dependencies are only needed on ubuntu as that's the only place where # we make cross-compilation if [[ $OS =~ ^ubuntu.*$ ]]; then