From 11cc559d35e16711cbe4f054f144f20ae9800230 Mon Sep 17 00:00:00 2001 From: xkeyC <39891083+xkeyC@users.noreply.github.com> Date: Sun, 17 Mar 2024 19:13:12 +0800 Subject: [PATCH] update workflow --- .github/workflows/windows_nightly.yml | 30 +++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/.github/workflows/windows_nightly.yml b/.github/workflows/windows_nightly.yml index 8980d18..78aada0 100644 --- a/.github/workflows/windows_nightly.yml +++ b/.github/workflows/windows_nightly.yml @@ -9,8 +9,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Set up Flutter msbuild uses: microsoft/setup-msbuild@v2 + - name: Set up Flutter uses: subosito/flutter-action@v2.12.0 with: @@ -18,31 +20,47 @@ jobs: cache: true cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:' # optional, change this to force refresh cache cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:' # optional, change this to specify the cache path - - run: flutter --version + + - run: flutter --version + - name: Set up Rust uses: dtolnay/rust-toolchain@stable + - run: rustup --version - run: cargo --version + - name: Rust Cache + uses: Swatinem/rust-cache@v2 + with: + workspaces: "rust/target" + cache-all-crates: true + - name: Set up LLVM uses: KyleMayes/install-llvm-action@v1 with: version: "17.0.2" + - name: Flutter pub get run: flutter pub get + - name: Rust cargo update run: cargo update working-directory: rust - - name: Set up cargp expand - run: cargo install cargo-expand + - name: Set up Flutter rust bridge - run: cargo install 'flutter_rust_bridge_codegen@^2.0.0-dev.0' + run: | + cargo install cargo-expand + cargo install 'flutter_rust_bridge_codegen@^2.0.0-dev.0' + - name: Rust bridge generate run: flutter_rust_bridge_codegen generate - name: flutter gen l10n - run: flutter pub add intl_utils - - run: flutter pub run intl_utils:generate + run: | + flutter pub add intl_utils + flutter pub run intl_utils:generate + - name: Flutter build Windows run: flutter build windows + - name: Archive build uses: actions/upload-artifact@v4 with: