Skip to content

Commit

Permalink
windows-msys
Browse files Browse the repository at this point in the history
  • Loading branch information
hemnstill committed Sep 16, 2023
1 parent 4d02d02 commit 204ea34
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/redis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,44 @@ jobs:
with:
workflow: ${{ github.workflow }}
artifact: build-musl

windows-msys:
runs-on: windows-latest

defaults:
run:
shell: msys2 {0}

steps:
- uses: actions/checkout@v3
- name: Version
run: |
(ConvertFrom-Json(Invoke-WebRequest -Headers @{'Authorization' = 'token ${{ secrets.ACTION_TOKEN }}'} -Uri "https://api.github.com/repos/redis/redis/releases/tags/7.0.13").Content).body -Replace '\(\#', '(https://github.com/redis/redis/pull/' | Set-Content .\redis_latest_body.txt
Invoke-WebRequest -Uri https://github.com/redis/redis/archive/refs/tags/7.0.13.tar.gz -OutFile redis-7.0.13.tar.gz
tar -xvf redis-7.0.13.tar.gz
shell: pwsh

- name: Setup dotnet
if: ${{ success() }}
uses: actions/setup-dotnet@v3
- run: |
dotnet publish -c Release -r win-x64 --sc
shell: pwsh
- uses: msys2/setup-msys2@v2
with:
update: true
install: gcc make pkg-config mingw-w64-x86_64-python libopenssl openssl-devel mingw-w64-x86_64-libc++
- name: Build Redis
if: ${{ success() }}
run: |
workspace=$(pwd)
sed -i 's/__GNU_VISIBLE/1/' /d/a/_temp/msys64/usr/include/dlfcn.h
cd redis-7.0.13 && make -i PREFIX=$workspace/dist install BUILD_TLS=yes
cp $workspace/README.md $workspace/start.bat /d/a/_temp/msys64/usr/bin/msys-2.0.dll /d/a/_temp/msys64/usr/bin/msys-crypto-3.dll /d/a/_temp/msys64/usr/bin/msys-ssl-3.dll redis.conf sentinel.conf $workspace/dist/bin/
cd $workspace/dist/
mv bin Redis-7.0.13-Windows-x64
tar -cvzf $workspace/Redis-7.0.13-Windows-x64.tar.gz Redis-7.0.13-Windows-x64/*
cp $workspace/publish/* Redis-7.0.13-Windows-x64/
mv Redis-7.0.13-Windows-x64 Redis-7.0.13-Windows-x64-with-Service
tar -cvzf $workspace/Redis-7.0.13-Windows-x64-with-Service.tar.gz Redis-7.0.13-Windows-x64-with-Service/*

0 comments on commit 204ea34

Please sign in to comment.