From bdf6c18580c3073297925a5d96fbcdfe30ef75b8 Mon Sep 17 00:00:00 2001 From: Arsenii Lyashenko Date: Wed, 27 Nov 2024 02:02:17 +0300 Subject: [PATCH] chore(ci): Install dependencies via Scoop in Windows (#4360) --- .github/workflows/build-win-native.yml | 49 ++++++++------------------ 1 file changed, 14 insertions(+), 35 deletions(-) diff --git a/.github/workflows/build-win-native.yml b/.github/workflows/build-win-native.yml index e2060e9c593..ac1cdd0f57f 100644 --- a/.github/workflows/build-win-native.yml +++ b/.github/workflows/build-win-native.yml @@ -16,7 +16,6 @@ env: CARGO_TERM_COLOR: always RUST_BACKTRACE: short TERM: xterm-256color - BINARYEN_VERSION: version_111 jobs: win-native: @@ -37,20 +36,22 @@ jobs: uses: msys2/setup-msys2@v2 with: path-type: inherit - install: >- - procps - mingw-w64-x86_64-protobuf + install: procps - - name: "Install: Strawberry Perl" + - name: "Install: Packages from Scoop" + uses: MinoruSekine/setup-scoop@v4.0.1 + with: + apps: >- + perl + binaryen + wabt + protobuf + buckets: extras + + - name: "Install: Set `OPENSSL_SRC_PERL` environment variable" run: | - $perlPath = "$Env:USERPROFILE\strawberry-perl" - - $tmp = New-TemporaryFile | Rename-Item -NewName { $_ -replace 'tmp$', 'zip' } -PassThru - Invoke-WebRequest -OutFile $tmp "https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/download/SP_54001_64bit_UCRT/strawberry-perl-5.40.0.1-64bit-portable.zip" - $tmp | Expand-Archive -DestinationPath $perlPath -Force - $tmp | Remove-Item - - Add-Content -Path $Env:GITHUB_ENV -Value "OPENSSl_SRC_PERL=$perlPath/perl/bin/perl.exe" + $perl = Resolve-Path "~\scoop\apps\perl\current\perl\bin\perl.exe" + Add-Content -Path $Env:GITHUB_ENV -Value "OPENSSL_SRC_PERL=$perl" shell: powershell - name: "Install: Rustup" @@ -87,28 +88,6 @@ jobs: $tmp | Remove-Item shell: powershell - - name: "Install: binaryen" - run: | - $tmp = New-TemporaryFile | Rename-Item -NewName { $_ -replace 'tmp$', 'tar.gz' } -PassThru - Invoke-WebRequest -OutFile $tmp "https://github.com/WebAssembly/binaryen/releases/download/$Env:BINARYEN_VERSION/binaryen-$Env:BINARYEN_VERSION-x86_64-windows.tar.gz" - $outputDir = if ($Env:CARGO_HOME) { Join-Path $Env:CARGO_HOME "bin" } else { "~/.cargo/bin" } - tar zxf $tmp - cp "./binaryen-$Env:BINARYEN_VERSION/bin/*" $outputDir - Remove-Item -Recurse "./binaryen-$Env:BINARYEN_VERSION" - $tmp | Remove-Item - shell: powershell - - - name: "Install: wabt" - run: | - $tmp = New-TemporaryFile | Rename-Item -NewName { $_ -replace 'tmp$', 'tar.gz' } -PassThru - Invoke-WebRequest -OutFile $tmp https://github.com/WebAssembly/wabt/releases/download/1.0.29/wabt-1.0.29-windows.tar.gz - $outputDir = if ($Env:CARGO_HOME) { Join-Path $Env:CARGO_HOME "bin" } else { "~/.cargo/bin" } - tar zxf $tmp - cp ./wabt-1.0.29/bin/* $outputDir - Remove-Item -Recurse ./wabt-1.0.29 - $tmp | Remove-Item - shell: powershell - - name: "Build: Node" run: ./scripts/gear.sh build node --release --locked