diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04d076a..0ab79df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -87,10 +87,10 @@ jobs: - uses: actions/upload-artifact@v4 with: path: docs/_build/html/* + name: docs build-wheel-sdist: needs: - - lint - test - test-docs name: Build package @@ -112,8 +112,10 @@ jobs: build-standalone-dist: name: Build standalone - needs: build-wheel-sdist - runs-on: ubuntu-latest + needs: + - test + - test-docs + runs-on: ${{ matrix.runs-on }} strategy: fail-fast: false matrix: @@ -121,7 +123,7 @@ jobs: - ubuntu-latest # ARM - macos-14 - # X86 + # X86_64 - macos-13 - windows-latest steps: @@ -130,21 +132,28 @@ jobs: uses: actions/setup-python@v5 with: python-version: "3.11" + - name: Install PyInstaller + if: matrix.runs-on == 'macos-13' || matrix.runs-on == 'macos-14' + run: pip install -U pyinstaller - name: Install dependencies + if: matrix.runs-on == 'windows-latest' + shell: bash run: | pip install -U pyinstaller - sudo apt install upx + choco install -y upx + - name: Install dependencies + if: matrix.runs-on == 'ubuntu-latest' + run: | + pip install -U pyinstaller + sudo apt-get install -y upx-ucl - name: Install package run: pip install . - name: Build standalone distribution shell: bash run: sh scripts/build.sh - name: Compress with UPX - run: | - upx --best -9 dist/md2po - upx --best -9 dist/po2md - upx --best -9 dist/md2po2md - upx --best -9 dist/mdpo2html + if: matrix.runs-on != 'macos-latest' + run: upx -f --best -9 dist/* - name: Prepare upload run: | mv dist/md2po dist/md2po-${{ matrix.runs-on }} @@ -162,6 +171,7 @@ jobs: name: Build final distribution runs-on: ubuntu-latest needs: + - lint - build-wheel-sdist - build-standalone-dist steps: @@ -179,7 +189,7 @@ jobs: uses: actions/download-artifact@v4 with: name: macos-13-build - path: ./build/mac-x64 + path: ./build/mac-x86_64 - name: Download Linux artifact uses: actions/download-artifact@v4 with: @@ -198,20 +208,20 @@ jobs: mv md2po2md-ubuntu-latest md2po2md mv mdpo2html-ubuntu-latest mdpo2html cd ../.. - tar -czf dist/mdpo-linux-x64.tar.gz -C build/linux \ + tar -czf dist/mdpo-linux-x86_64.tar.gz -C build/linux \ md2po po2md md2po2md mdpo2html - name: Create MacOS tarballs run: | cd build - mv mac-x64/md2po-macos-13 mac-x64/md2po + mv mac-x86_64/md2po-macos-13 mac-x86_64/md2po mv mac-arm64/md2po-macos-14 mac-arm64/md2po - mv mac-x64/po2md-macos-13 mac-x64/po2md + mv mac-x86_64/po2md-macos-13 mac-x86_64/po2md mv mac-arm64/po2md-macos-14 mac-arm64/po2md - mv mac-x64/md2po2md-macos-13 mac-x64/md2po2md + mv mac-x86_64/md2po2md-macos-13 mac-x86_64/md2po2md mv mac-arm64/md2po2md-macos-14 mac-arm64/md2po2md - mv mac-x64/mdpo2html-macos-13 mac-x64/mdpo2html + mv mac-x86_64/mdpo2html-macos-13 mac-x86_64/mdpo2html mv mac-arm64/mdpo2html-macos-14 mac-arm64/mdpo2html - tar -czf ../dist/mdpo-mac-x64.tar.gz -C mac-x64 \ + tar -czf ../dist/mdpo-mac-x86_64.tar.gz -C mac-x86_64 \ md2po po2md md2po2md mdpo2html tar -czf ../dist/mdpo-mac-arm64.tar.gz -C mac-arm64 \ md2po po2md md2po2md mdpo2html @@ -222,7 +232,7 @@ jobs: mv po2md-windows-latest po2md.exe mv md2po2md-windows-latest md2po2md.exe mv mdpo2html-windows-latest mdpo2html.exe - 7z a -tzip ../../dist/mdpo-windows-x64.zip \ + 7z a -tzip ../../dist/mdpo-windows-x86_64.zip \ md2po.exe po2md.exe md2po2md.exe mdpo2html.exe - name: Remove build directories run: rm -rf build @@ -246,7 +256,6 @@ jobs: with: user: __token__ password: ${{ secrets.PYPI_TOKEN }} - # repository_url: https://test.pypi.org/legacy/ skip-existing: true release: