diff --git a/.github/workflows/redis.yml b/.github/workflows/redis.yml index ca6d38132..cddaf3cc4 100644 --- a/.github/workflows/redis.yml +++ b/.github/workflows/redis.yml @@ -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/*