Add Android build target #272
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: | |
BORING_SSL_COMMIT: d24a38200fef19150eef00cad35b138936c08767 | |
jobs: | |
build-windows: | |
name: Build windows binaries | |
runs-on: windows-2019 | |
strategy: | |
matrix: | |
include: | |
- { sys: mingw64, env: x86_64 } | |
- { sys: mingw32, 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 | |
- uses: msys2/setup-msys2@v2 | |
name: Install msys | |
with: | |
update: true | |
msystem: ${{ matrix.sys }} | |
install: >- | |
git | |
patch | |
unzip | |
mingw-w64-${{ matrix.env }}-brotli | |
mingw-w64-${{ matrix.env }}-libidn2 | |
mingw-w64-${{ matrix.env }}-zstd | |
mingw-w64-${{ matrix.env }}-nghttp2 | |
mingw-w64-${{ matrix.env }}-zlib | |
mingw-w64-${{ matrix.env }}-make | |
mingw-w64-${{ matrix.env }}-cmake | |
mingw-w64-${{ matrix.env }}-nasm | |
mingw-w64-${{ matrix.env }}-gcc | |
mingw-w64-${{ matrix.env }}-go | |
mingw-w64-${{ matrix.env }}-libuv | |
- name: Copy and patch | |
shell: msys2 {0} | |
run: ./win/build.sh ${{ matrix.sys }} | |
# - name: Setup tmate session for debugging | |
# uses: mxschmitt/action-tmate@v3 | |
# | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- name: Generate lib files | |
run: ./win/dll2lib.bat ${{ matrix.env }} build\dist\libcurl.dll | |
- name: Build tarball | |
shell: msys2 {0} | |
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 ./build/dist . | |
else | |
tar cvzf libcurl-impersonate-${{ matrix.env }}-win32.tar.gz -C ./build/dist . | |
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 |