From 9da8f418958d5a876519a55859057d00e88dfffe Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Tue, 22 Mar 2022 20:26:55 -0700 Subject: [PATCH] Upgrade Windows Actions runners to windows-latest (#1137) --- .github/workflows/ci.yaml | 10 +++++++++- .github/workflows/release.yaml | 2 +- bin/package | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index dde458f..1ed2b1f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -21,7 +21,7 @@ jobs: os: - ubuntu-latest - macos-latest - - windows-2016 + - windows-latest runs-on: ${{matrix.os}} @@ -31,6 +31,14 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Remove Broken WSL bash executable + if: ${{ matrix.os == 'windows-latest' }} + shell: cmd + run: | + takeown /F C:\Windows\System32\bash.exe + icacls C:\Windows\System32\bash.exe /grant administrators:F + del C:\Windows\System32\bash.exe + - name: Install Rust Toolchain Components uses: actions-rs/toolchain@v1 with: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c3de411..af3ffcc 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -32,7 +32,7 @@ jobs: os: macos-latest target_rustflags: '' - target: x86_64-pc-windows-msvc - os: windows-2016 + os: windows-latest target_rustflags: '' - target: x86_64-unknown-linux-musl os: ubuntu-latest diff --git a/bin/package b/bin/package index 232e873..769bc54 100755 --- a/bin/package +++ b/bin/package @@ -14,7 +14,7 @@ RUSTFLAGS="--deny warnings --codegen target-feature=+crt-static $TARGET_RUSTFLAG cargo build --bin just --target $TARGET --release EXECUTABLE=target/$TARGET/release/just -if [[ $OS == windows-2016 ]]; then +if [[ $OS == windows-latest ]]; then EXECUTABLE=$EXECUTABLE.exe fi @@ -38,7 +38,7 @@ case $OS in tar czf $ARCHIVE * echo "::set-output name=archive::$ARCHIVE" ;; - windows-2016) + windows-latest) ARCHIVE=$DIST/just-$VERSION-$TARGET.zip 7z a $ARCHIVE * echo "::set-output name=archive::`pwd -W`/just-$VERSION-$TARGET.zip"