diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fdae898..51cc46c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,39 +11,40 @@ jobs: include: - os: macos-latest arch: arm64 + shell: bash - os: macos-latest arch: x86_64 + shell: bash - os: ubuntu-latest arch: i686 + shell: bash - os: ubuntu-latest arch: x86_64 + shell: bash - os: windows-latest arch: AMD64 - - os: windows-latest - arch: x86 + shell: 'msys2 {0}' + defaults: + run: + shell: ${{ matrix.shell }} steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: python-version: 3.8 - - name: Install nasm - if: matrix.os == 'windows-latest' - run: choco install -y nasm - - name: Install nmake - if: matrix.os == 'windows-latest' - run: | - & "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" modify ` - --installPath "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise" ` - --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --passive --norestart - shell: powershell - name: Install qemu if: matrix.os == 'ubuntu-latest' uses: docker/setup-qemu-action@v3 + - uses: msys2/setup-msys2@v2 + if: matrix.os == 'windows-latest' + with: + install: base-devel mingw-w64-x86_64-gcc mingw-w64-x86_64-gperf mingw-w64-x86_64-nasm + path-type: inherit - name: Build OpenSSL env: CIBW_ARCHS: ${{ matrix.arch }} CIBW_BEFORE_BUILD: python scripts/build-openssl.py /tmp/vendor - CIBW_BEFORE_BUILD_WINDOWS: scripts\build-openssl.bat C:\cibw\vendor + CIBW_BEFORE_BUILD_WINDOWS: python scripts\build-ffmpeg.py C:\cibw\vendor CIBW_BUILD: cp38-* CIBW_SKIP: '*-musllinux*' CIBW_TEST_COMMAND: python -c "import dummy" diff --git a/scripts/build-openssl.bat b/scripts/build-openssl.bat deleted file mode 100644 index 5a3355b..0000000 --- a/scripts/build-openssl.bat +++ /dev/null @@ -1,44 +0,0 @@ -set destdir=%1 - -for %%d in (openssl %destdir%) do ( - if exist %%d ( - rmdir /s /q %%d - ) -) - -if %PYTHON_ARCH% == 64 ( - set platform=win_amd64 - set OPENSSL_CONFIG=VC-WIN64A - set VC_ARCH=x64 -) else ( - set platform=win32 - set OPENSSL_CONFIG=VC-WIN32 - set VC_ARCH=x86 -) -set outputfile=output\openssl-%platform%.tar.gz - -call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" %VC_ARCH% -SET PATH=%PATH%;C:\Program Files\NASM - -mkdir openssl -curl -L https://www.openssl.org/source/openssl-3.1.4.tar.gz -o openssl.tar.gz -tar xzf openssl.tar.gz -C openssl --strip-components 1 -cd openssl - -perl Configure no-comp no-shared no-tests %OPENSSL_CONFIG% -nmake - -mkdir %destdir% -mkdir %destdir%\include -mkdir %destdir%\lib -xcopy include %destdir%\include\ /E -copy libcrypto.lib %destdir%\lib\ -copy libssl.lib %destdir%\lib\ -cd .. - -if not exist output ( - mkdir output -) -SET PATH=C:\Program Files\Git\usr\bin;%PATH% -tar czvf %outputfile% -C %destdir% include lib -dir output