Prepare QCW OpenSSH (from revision) #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Prepare QCW OpenSSH (from revision) | |
on: workflow_dispatch | |
env: | |
OPENSSH_GITURL: https://github.com/PowerShell/openssh-portable.git | |
OPENSSH_SHA: f72324ffa1fbf076291cbe92d968dc0b6040a2fe | |
ZLIB_VERSION: 1.3 | |
MSYS: "winsymlinks:native" | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: "ποΈ Install msys2" | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: UCRT64 | |
update: true | |
install: >- | |
base-devel | |
diffutils | |
git | |
grep | |
make | |
sed | |
unzip | |
- name: "ποΈ Install tools" | |
uses: crazy-max/ghaction-chocolatey@v2 | |
with: | |
args: install 7zip.install | |
- name: "π Configure checkout" | |
run: git config --global core.autocrlf input | |
- name: "π Checkout" | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: "π Link tools" | |
shell: msys2 {0} | |
run: | | |
mkdir -p /usr/local/bin | |
ln -sf "/c/Program Files/7-Zip/7z.exe" "/usr/local/bin/7z.exe" | |
- name: "π Fetch sources" | |
shell: msys2 {0} | |
run: | | |
wget -q "https://www.zlib.net/zlib-$ZLIB_VERSION.tar.xz" | |
wget -q "https://www.zlib.net/zlib-$ZLIB_VERSION.tar.xz.asc" | |
gpg --keyserver keys.openpgp.org --recv-key 5ED46A6721D365587791E2AA783FCD8E58BCAFBA | |
gpg "zlib-$ZLIB_VERSION.tar.xz.asc" | |
7z x "zlib-$ZLIB_VERSION.tar.xz" | |
7z x "zlib-$ZLIB_VERSION.tar" | |
mv "zlib-$ZLIB_VERSION" zlib-release | |
cd zlib-release | |
patch --binary -l -p 1 < ../patches/zlib/0001-Add-vc17-support.patch | |
patch --binary -l -p 1 < ../patches/zlib/0002-Set-Multibyte-character-set-and-spectre-mitigation.patch | |
cd .. | |
mkdir openssh-release | |
cd openssh-release | |
git init | |
git remote add origin $OPENSSH_GITURL | |
git fetch --depth 1 origin $OPENSSH_SHA | |
git checkout FETCH_HEAD | |
patch --binary -l -p 1 < ../patches/openssh-portable/0001-Add-support-for-AF_UNIX.patch | |
- name: "π οΈ Build Zlip" | |
working-directory: zlib-release | |
shell: pwsh | |
run: | | |
cd contrib/vstudio/vc17 | |
MSBuild zlibvc.sln /p:Configuration=Release /p:Platform=x64 |