Skip to content

Build all

Build all #183

Workflow file for this run

name: Build all
on:
workflow_dispatch:
inputs:
branch:
description: PDFium branch
required: false
default: main
version:
description: PDFium version
required: false
default: ""
enable_v8:
description: Enable V8
type: boolean
required: false
default: false
is_debug:
description: Is debug
type: boolean
required: false
default: false
release:
description: Publish GitHub release
type: boolean
required: false
default: false
nuget:
description: Publish on nuget.org
type: boolean
required: false
default: false
anaconda:
description: Publish on anaconda.org
type: boolean
required: false
default: false
jobs:
android_arm:
name: Android ARM
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: android
target_cpu: arm
enable_v8: false
android_arm_v8:
name: Android ARM V8
if: github.event.inputs.enable_v8 == 'true'
needs: android_arm
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: android
target_cpu: arm
enable_v8: true
android_arm64:
name: Android ARM64
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: android
target_cpu: arm64
enable_v8: false
android_arm64_v8:
name: Android ARM64 V8
if: github.event.inputs.enable_v8 == 'true'
needs: android_arm64
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: android
target_cpu: arm64
enable_v8: true
android_x64:
name: Android x64
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: android
target_cpu: x64
enable_v8: false
android_x64_v8:
name: Android x64 V8
if: github.event.inputs.enable_v8 == 'true'
needs: android_x64
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: android
target_cpu: x64
enable_v8: true
android_x86:
name: Android x86
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: android
target_cpu: x86
enable_v8: false
android_x86_v8:
name: Android x86 V8
if: github.event.inputs.enable_v8 == 'true'
needs: android_x86
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: android
target_cpu: x86
enable_v8: true
ios_arm64:
name: iOS ARM64
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: ios
target_cpu: arm64
target_environment: device
enable_v8: false
ios_arm64_v8:
name: iOS ARM64 V8
if: github.event.inputs.enable_v8 == 'true'
needs: ios_arm64
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: ios
target_cpu: arm64
target_environment: device
enable_v8: true
ios_x64:
name: iOS x64
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: ios
target_cpu: x64
target_environment: simulator
enable_v8: false
ios_x64_v8:
name: iOS x64 V8
if: github.event.inputs.enable_v8 == 'true'
needs: ios_x64
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: ios
target_cpu: x64
target_environment: simulator
enable_v8: true
linux_arm:
name: Linux ARM
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: linux
target_cpu: arm
enable_v8: false
linux_arm_v8:
name: Linux ARM V8
if: github.event.inputs.enable_v8 == 'true'
needs: linux_arm
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: linux
target_cpu: arm
enable_v8: true
linux_arm64:
name: Linux ARM64
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: linux
target_cpu: arm64
enable_v8: false
linux_arm64_v8:
name: Linux ARM64 V8
if: github.event.inputs.enable_v8 == 'true'
needs: linux_arm64
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: linux
target_cpu: arm64
enable_v8: true
linux_x64:
name: Linux x64
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: linux
target_cpu: x64
enable_v8: false
linux_x64_v8:
name: Linux x64 V8
if: github.event.inputs.enable_v8 == 'true'
needs: linux_x64
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: linux
target_cpu: x64
enable_v8: true
linux_x86:
name: Linux x86
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: linux
target_cpu: x86
enable_v8: false
linux_x86_v8:
name: Linux x86 V8
if: github.event.inputs.enable_v8 == 'true'
needs: linux_x86
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: linux
target_cpu: x86
enable_v8: true
linux_musl_arm64:
name: Linux musl ARM64
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: linux
target_cpu: arm64
target_environment: musl
enable_v8: false
linux_musl_arm64_v8:
name: Linux musl ARM64 V8
if: github.event.inputs.enable_v8 == 'true'
needs: linux_musl_arm64
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: linux
target_cpu: arm64
target_environment: musl
enable_v8: true
linux_musl_x64:
name: Linux musl x64
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: linux
target_cpu: x64
target_environment: musl
enable_v8: false
linux_musl_x64_v8:
name: Linux musl x64 V8
if: github.event.inputs.enable_v8 == 'true'
needs: linux_musl_x64
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: linux
target_cpu: x64
target_environment: musl
enable_v8: true
linux_musl_x86:
name: Linux musl x86
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: linux
target_cpu: x86
target_environment: musl
enable_v8: false
linux_musl_x86_v8:
name: Linux musl x86 V8
if: github.event.inputs.enable_v8 == 'true'
needs: linux_musl_x86
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: linux
target_cpu: x86
target_environment: musl
enable_v8: true
mac_arm64:
name: macOS ARM64
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: mac
target_cpu: arm64
enable_v8: false
mac_arm64_v8:
name: macOS ARM64 V8
if: github.event.inputs.enable_v8 == 'true'
needs: mac_arm64
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: mac
target_cpu: arm64
enable_v8: true
mac_x64:
name: macOS x64
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: mac
target_cpu: x64
enable_v8: false
mac_x64_v8:
name: macOS x64 V8
if: github.event.inputs.enable_v8 == 'true'
needs: mac_x64
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: mac
target_cpu: x64
enable_v8: true
win_arm64:
name: Windows ARM64
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: win
target_cpu: arm64
enable_v8: false
win_arm64_v8:
name: Windows ARM64 V8
if: github.event.inputs.enable_v8 == 'true'
needs: win_arm64
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: win
target_cpu: arm64
enable_v8: true
win_x64:
name: Windows x64
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: win
target_cpu: x64
enable_v8: false
win_x64_v8:
name: Windows x64 V8
if: github.event.inputs.enable_v8 == 'true'
needs: win_x64
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: win
target_cpu: x64
enable_v8: true
win_x86:
name: Windows x86
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: win
target_cpu: x86
enable_v8: false
win_x86_v8:
name: Windows x86 V8
if: github.event.inputs.enable_v8 == 'true'
needs: win_x86
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: win
target_cpu: x86
enable_v8: true
wasm:
name: WASM
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version }}
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: wasm
target_cpu: wasm
enable_v8: false
mac_univ:
name: macOS univ
needs:
- mac_arm64
- mac_x64
uses: ./.github/workflows/mac-univ.yml
with:
artifact_x64: ${{ needs.mac_x64.outputs.artifact }}
artifact_arm64: ${{ needs.mac_arm64.outputs.artifact }}
mac_univ_v8:
name: macOS univ V8
needs:
- mac_arm64_v8
- mac_x64_v8
uses: ./.github/workflows/mac-univ.yml
with:
artifact_x64: ${{ needs.mac_x64_v8.outputs.artifact }}
artifact_arm64: ${{ needs.mac_arm64_v8.outputs.artifact }}
nuget:
name: Build NuGet packages
runs-on: windows-latest
needs:
- android_arm
- android_arm_v8
- android_arm64
- android_arm64_v8
- android_x64
- android_x64_v8
- android_x86
- android_x86_v8
- ios_arm64
- ios_arm64_v8
- ios_x64
- ios_x64_v8
- linux_arm
- linux_arm_v8
- linux_arm64
- linux_arm64_v8
- linux_x64
- linux_x64_v8
- linux_x86
- linux_x86_v8
- linux_musl_arm64
- linux_musl_arm64_v8
- linux_musl_x64
- linux_musl_x64_v8
- linux_musl_x86
- linux_musl_x86_v8
- mac_arm64
- mac_arm64_v8
- mac_x64
- mac_x64_v8
- wasm
- win_arm64
- win_arm64_v8
- win_x64
- win_x64_v8
- win_x86
- win_x86_v8
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: nuget
- name: Prepare header files
shell: bash
run: mkdir -p nuget/include/pdfium && cp -r nuget/pdfium-win-x86/include/* nuget/include/pdfium/
- name: Define properties
shell: bash
run: |
VERSION="${{ github.event.inputs.version || '0.0.0.0' }}"
BRANCH="${GITHUB_REF#refs/heads/}"
COMMIT="${GITHUB_SHA}"
RELEASE_NOTES="${{github.server_url}}/${{github.repository}}/releases"
${{ github.event.inputs.release }} && RELEASE_NOTES+="/tag/${{ github.event.inputs.branch }}"
echo "NUSPEC_PROPERTIES=version=$VERSION;branch=$BRANCH;commit=$COMMIT;releaseNotes=$RELEASE_NOTES" >> "$GITHUB_ENV"
- name: Pack
shell: bash
run: |
for NUSPEC in nuget/*.nuspec; do
echo "::group::$NUSPEC"
nuget pack "$NUSPEC" -p "$NUSPEC_PROPERTIES"
echo "::endgroup::"
done
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: NuGet packages
path: '*.nupkg'
- name: Push to nuget.org
if: env.NUGET_API_KEY && startsWith(github.event.inputs.branch, 'chromium/') && github.event.inputs.version && github.event.inputs.nuget == 'true'
run: nuget push -Source nuget.org -ApiKey ${{ secrets.NUGET_API_KEY }} *.nupkg
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
conda:
name: Conda packages
if: github.event.inputs.version
runs-on: ubuntu-latest
needs:
- linux_arm64
- linux_x64
- mac_arm64
- mac_x64
- win_arm64
- win_x64
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Create build script
run: |
cat >conda-build.sh <<END
#!/bin/bash -eux
PLATFORM=\$1
SOURCE_DIR=\$2
VERSION="${{ github.event.inputs.version }}"
# rename "include/" into "include/pdfium/"
shopt -s extglob
mkdir -p \$SOURCE_DIR/include/pdfium
mv \$SOURCE_DIR/include/!(pdfium) \$SOURCE_DIR/include/pdfium
python conda/build.py pdfium-binaries \$PLATFORM \$VERSION --about-file conda/about.json --source-dir \$SOURCE_DIR --output-dir conda/out
END
chmod +x conda-build.sh
- name: Build for linux-64
run: ./conda-build.sh linux-64 pdfium-linux-x64
- name: Build for linux-aarch64
run: ./conda-build.sh linux-aarch64 pdfium-linux-arm64
- name: Build for osx-arm64
run: ./conda-build.sh osx-arm64 pdfium-mac-arm64
- name: Build for osx-64
run: ./conda-build.sh osx-64 pdfium-mac-x64
- name: Build for win-64
run: ./conda-build.sh win-64 pdfium-win-x64
- name: Build for win-arm64
run: ./conda-build.sh win-arm64 pdfium-win-arm64
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: Conda packages
path: conda/out/
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v3
- name: Install anaconda-client
run: conda install -yq anaconda-client
shell: bash -l {0}
- name: Upload to Anaconda
if: env.ANACONDA_API_TOKEN && startsWith(github.event.inputs.branch, 'chromium/') && github.event.inputs.version && github.event.inputs.anaconda == 'true'
run: find conda/out -name 'pdfium-binaries-*.tar.bz2' -exec anaconda upload --force {} +
shell: bash -l {0}
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
publish:
name: Publish Release
if: startsWith(github.event.inputs.branch, 'chromium/') && github.event.inputs.version && github.event.inputs.release == 'true'
runs-on: ubuntu-latest
needs:
- android_arm
- android_arm_v8
- android_arm64
- android_arm64_v8
- android_x64
- android_x64_v8
- android_x86
- android_x86_v8
- ios_arm64
- ios_arm64_v8
- ios_x64
- ios_x64_v8
- linux_arm
- linux_arm_v8
- linux_arm64
- linux_arm64_v8
- linux_musl_arm64
- linux_musl_arm64_v8
- linux_musl_x64
- linux_musl_x64_v8
- linux_musl_x86
- linux_musl_x86_v8
- linux_x64
- linux_x64_v8
- linux_x86
- linux_x86_v8
- mac_arm64
- mac_arm64_v8
- mac_univ
- mac_univ_v8
- mac_x64
- mac_x64_v8
- wasm
- win_arm64
- win_arm64_v8
- win_x64
- win_x64_v8
- win_x86
- win_x86_v8
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Create tarballs
run: |
for DIR in pdfium-*; do
echo "::group::$DIR"
(cd $DIR; tar czf ../$DIR.tgz *)
echo "::endgroup::"
done
- name: Write release body
run: echo 'This version was built with branch `${{ github.event.inputs.branch }}` of PDFium' > RELEASE.md
- name: Get changes
continue-on-error: true
run: |
CURRENT_REV=${{ github.event.inputs.branch }}
PREVIOUS_REV=$(curl --silent "https://api.github.com/repos/${{ github.repository }}/releases/latest" | jq -r ".tag_name")
git clone -b "${{ github.event.inputs.branch }}" https://pdfium.googlesource.com/pdfium.git
cat <<END >> RELEASE.md
### Changes
Commits between \`$PREVIOUS_REV\` and \`$CURRENT_REV\`:
END
git -C "pdfium" log origin/${PREVIOUS_REV}.. --pretty=format:'* [%s](https://pdfium.googlesource.com/pdfium/+/%H)' >> RELEASE.md
- name: Generate artifacts checksums
run: sha256sum pdfium-*.tgz > pdfium-sha256sum.txt
- name: Publish Release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
bodyFile: RELEASE.md
token: ${{ secrets.GITHUB_TOKEN }}
name: PDFium ${{ github.event.inputs.version }}
tag: ${{ github.event.inputs.branch }}
artifacts: "pdfium-*.tgz,pdfium-sha256sum.txt"