Skip to content

Commit

Permalink
chore(ci): Install dependencies via Scoop in Windows (#4360)
Browse files Browse the repository at this point in the history
  • Loading branch information
ark0f authored Nov 26, 2024
1 parent f481bb2 commit bdf6c18
Showing 1 changed file with 14 additions and 35 deletions.
49 changes: 14 additions & 35 deletions .github/workflows/build-win-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: short
TERM: xterm-256color
BINARYEN_VERSION: version_111

jobs:
win-native:
Expand All @@ -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/[email protected]
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"
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit bdf6c18

Please sign in to comment.