Windows support (#97) #347
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: Build for windows | |
on: | |
push: | |
branches: | |
- main | |
- feature/* | |
- bugfix/* | |
tags: | |
- "v*.*.*" | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: write | |
env: | |
ZLIB_COMMIT: 09155eaa2f9270dc4ed1fa13e2b4b2613e6e4851 | |
ZSTD_COMMIT: 794ea1b0afca0f020f4e57b6732332231fb23c70 | |
BROTLI_COMMIT: ed738e842d2fbdf2d6459e39267a633c4a9b2f5d | |
BORINGSSL_COMMIT: cd95210465496ac2337b313cf49f607762abe286 | |
CURL_COMMIT: de7b3e89218467159a7af72d58cea8425946e97d | |
NGHTTP2_COMMIT: 8f44147c385fb1ed93a6f39911eeb30279bfd2dd | |
jobs: | |
build-windows: | |
name: Build windows binaries | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
include: | |
- { sys: vcvars64, env: x86_64 } | |
- { sys: vcvars32, env: i686 } | |
steps: | |
- name: configure Pagefile | |
uses: al-cheb/[email protected] | |
with: | |
minimum-size: 16GB | |
maximum-size: 16GB | |
disk-root: "C:" | |
- name: Install python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Check out the repo | |
uses: actions/checkout@v2 | |
- name: Install NASM | |
shell: cmd | |
run: choco install nasm -y | |
- name: Fetch and patch deps | |
shell: bash | |
run: ./win/deps.sh | |
# - name: Setup tmate session for debugging | |
# uses: mxschmitt/action-tmate@v3 | |
# | |
- name: Build | |
shell: cmd | |
run: ./win/build.bat ${{ matrix.sys }} | |
- name: Build tarball | |
shell: bash | |
run: | | |
if [[ "${{ startsWith(github.ref, 'refs/tags/') }}" == "true" ]]; then | |
tar cvzf libcurl-impersonate-${{ github.head_ref || github.ref_name }}.${{ matrix.env }}-win32.tar.gz -C ./packages . | |
else | |
tar cvzf libcurl-impersonate-${{ matrix.env }}-win32.tar.gz -C ./packages . | |
fi | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: libcurl-impersonate.${{ matrix.env }}-win32.tar.gz | |
path: ./libcurl-impersonate*.tar.gz | |
- name: Upload release files | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
prerelease: true | |
files: libcurl-impersonate-${{ github.head_ref || github.ref_name }}.${{ matrix.env }}-win32.tar.gz |