From 27d21b0367b47477957567c076a53941becc3e1c Mon Sep 17 00:00:00 2001 From: Avii Date: Fri, 12 Jul 2024 13:36:30 +0200 Subject: [PATCH] rwar --- .gitea/workflows/build-windows.yaml | 70 ++++++++++++++++------------- 1 file changed, 38 insertions(+), 32 deletions(-) diff --git a/.gitea/workflows/build-windows.yaml b/.gitea/workflows/build-windows.yaml index 550bf4e..ff3920c 100644 --- a/.gitea/workflows/build-windows.yaml +++ b/.gitea/workflows/build-windows.yaml @@ -44,36 +44,42 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 - - name: Setup Rust toolchain and cache - if: matrix.platform != 'windows-2022' - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - toolchain: nightly - - name: Ensure rust is up to date - if: matrix.platform == 'windows-2022' + - name: Log run: | - rustup update - rustup toolchain install nightly - - name: Create output directory for windows - if: matrix.platform == 'windows-2022' - run: mkdir -f output - - name: Create output directory for linux - if: matrix.platform != 'windows-2022' - run: mkdir output - - name: Build release - run: cargo +nightly -Z unstable-options b -r --artifact-dir ./output - - name: Collect windows artifacts - if: matrix.platform == 'windows-2022' - run: | - cp -r -fo assets $env:GITEA_WORKSPACE/output/ - Compress-Archive -Path $env:GITEA_WORKSPACE/output/* -DestinationPath $env:GITEA_WORKSPACE/${{ gitea.event.repository.name }}_${{ matrix.name }}.${{ matrix.archive }} - - name: Collect linux/macos artifacts - if: matrix.platform != 'windows-2022' - run: | - cp -rf assets ${GITEA_WORKSPACE}/output/ - tar -czvf ${GITHUB_WORKSPACE}/${{ gitea.event.repository.name }}_${{ matrix.name }}.${{ matrix.archive }} -C ${GITHUB_WORKSPACE}/output/ . - - name: Upload artifacts - uses: ncipollo/release-action@v1 - with: - allowUpdates: true - artifacts: "${{ gitea.event.repository.name }}_${{ matrix.name }}.${{ matrix.archive }}" + echo "$env:GITEA_WORKSPACE" + echo "$env:GITHUB_WORKSPACE" + echo "$GITEA_WORKSPACE" + echo "$GITHUB_WORKSPACE" + # - name: Setup Rust toolchain and cache + # if: matrix.platform != 'windows-2022' + # uses: actions-rust-lang/setup-rust-toolchain@v1 + # with: + # toolchain: nightly + # - name: Ensure rust is up to date + # if: matrix.platform == 'windows-2022' + # run: | + # rustup update + # rustup toolchain install nightly + # - name: Create output directory for windows + # if: matrix.platform == 'windows-2022' + # run: mkdir -f output + # - name: Create output directory for linux + # if: matrix.platform != 'windows-2022' + # run: mkdir output + # - name: Build release + # run: cargo +nightly -Z unstable-options b -r --artifact-dir ./output + # - name: Collect windows artifacts + # if: matrix.platform == 'windows-2022' + # run: | + # cp -r -fo assets $env:GITEA_WORKSPACE/output/ + # Compress-Archive -Path $env:GITEA_WORKSPACE/output/* -DestinationPath $env:GITEA_WORKSPACE/${{ gitea.event.repository.name }}_${{ matrix.name }}.${{ matrix.archive }} + # - name: Collect linux/macos artifacts + # if: matrix.platform != 'windows-2022' + # run: | + # cp -rf assets ${GITEA_WORKSPACE}/output/ + # tar -czvf ${GITHUB_WORKSPACE}/${{ gitea.event.repository.name }}_${{ matrix.name }}.${{ matrix.archive }} -C ${GITHUB_WORKSPACE}/output/ . + # - name: Upload artifacts + # uses: ncipollo/release-action@v1 + # with: + # allowUpdates: true + # artifacts: "${{ gitea.event.repository.name }}_${{ matrix.name }}.${{ matrix.archive }}"