Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
kistlin committed Jan 10, 2025
2 parents 690cea2 + f729f31 commit 9deaa5b
Show file tree
Hide file tree
Showing 34 changed files with 343 additions and 179 deletions.
137 changes: 112 additions & 25 deletions .github/workflows/build-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,52 +134,134 @@ jobs:
target_cpu: x86
enable_v8: true

ios_arm64:
name: iOS ARM64
ios_catalyst_arm64:
name: iOS catalyst 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: catalyst
enable_v8: false

ios_arm64_v8:
name: iOS ARM64 V8
ios_catalyst_arm64_v8:
name: iOS catalyst ARM64 V8
if: github.event.inputs.enable_v8 == 'true'
needs: ios_arm64
needs: ios_catalyst_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: catalyst
enable_v8: true

ios_x64:
name: iOS x64
ios_catalyst_x64:
name: iOS catalyst 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: catalyst
enable_v8: false

ios_x64_v8:
name: iOS x64 V8
ios_catalyst_x64_v8:
name: iOS catalyst x64 V8
if: github.event.inputs.enable_v8 == 'true'
needs: ios_x64
needs: ios_catalyst_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: catalyst
enable_v8: true

ios_device_arm64:
name: iOS device 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_device_arm64_v8:
name: iOS device ARM64 V8
if: github.event.inputs.enable_v8 == 'true'
needs: ios_device_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_simulator_arm64:
name: iOS simulator 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: simulator
enable_v8: false

ios_simulator_arm64_v8:
name: iOS simulator ARM64 V8
if: github.event.inputs.enable_v8 == 'true'
needs: ios_simulator_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: simulator
enable_v8: true

ios_simulator_x64:
name: iOS simulator 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_simulator_x64_v8:
name: iOS simulator x64 V8
if: github.event.inputs.enable_v8 == 'true'
needs: ios_simulator_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:
Expand Down Expand Up @@ -287,20 +369,21 @@ jobs:
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: linux
target_cpu: arm64
target_libc: musl
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_libc: musl
target_environment: musl
enable_v8: true

linux_musl_x64:
Expand All @@ -312,7 +395,7 @@ jobs:
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: linux
target_cpu: x64
target_libc: musl
target_environment: musl
enable_v8: false

linux_musl_x64_v8:
Expand All @@ -326,7 +409,7 @@ jobs:
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: linux
target_cpu: x64
target_libc: musl
target_environment: musl
enable_v8: true

linux_musl_x86:
Expand All @@ -338,7 +421,7 @@ jobs:
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: linux
target_cpu: x86
target_libc: musl
target_environment: musl
enable_v8: false

linux_musl_x86_v8:
Expand All @@ -352,7 +435,7 @@ jobs:
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: linux
target_cpu: x86
target_libc: musl
target_environment: musl
enable_v8: true

mac_arm64:
Expand Down Expand Up @@ -518,10 +601,12 @@ jobs:
- android_x64_v8
- android_x86
- android_x86_v8
- ios_arm64
- ios_arm64_v8
- ios_x64
- ios_x64_v8
- ios_device_arm64
- ios_device_arm64_v8
- ios_simulator_arm64
- ios_simulator_arm64_v8
- ios_simulator_x64
- ios_simulator_x64_v8
- linux_arm
- linux_arm_v8
- linux_arm64
Expand Down Expand Up @@ -660,10 +745,10 @@ jobs:
- android_x64_v8
- android_x86
- android_x86_v8
- ios_arm64
- ios_arm64_v8
- ios_x64
- ios_x64_v8
- ios_device_arm64
- ios_device_arm64_v8
- ios_simulator_x64
- ios_simulator_x64_v8
- linux_arm
- linux_arm_v8
- linux_arm64
Expand Down Expand Up @@ -714,6 +799,8 @@ jobs:
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:
Expand All @@ -722,4 +809,4 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
name: PDFium ${{ github.event.inputs.version }}
tag: ${{ github.event.inputs.branch }}
artifacts: "pdfium-*.tgz"
artifacts: "pdfium-*.tgz,pdfium-sha256sum.txt"
14 changes: 9 additions & 5 deletions .github/workflows/build-one.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,16 @@ on:
- x64
- x86
- wasm
target_libc:
description: Target libc
target_environment:
description: Target environment
type: choice
default: ''
options:
- default
- ''
- device
- catalyst
- musl
- simulator
enable_v8:
description: Enable V8
type: boolean
Expand All @@ -45,7 +49,7 @@ on:
description: Emscripten SDK
type: string
required: false
default: 3.1.34
default: 3.1.72
is_debug:
description: Is debug
type: boolean
Expand All @@ -62,6 +66,6 @@ jobs:
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
target_os: ${{ github.event.inputs.target_os }}
target_cpu: ${{ github.event.inputs.target_cpu }}
target_libc: ${{ github.event.inputs.target_libc }}
target_environment: ${{ github.event.inputs.target_environment }}
enable_v8: ${{ github.event.inputs.enable_v8 == 'true' }}
emsdk_version: ${{ github.event.inputs.emsdk_version }}
18 changes: 6 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ on:
description: Target (CPU arm|arm64|x64|x86|wasm)
type: string
required: true
target_libc:
description: Target libc (empty string or "musl")
target_environment:
description: Target environment (device|catalyst|musl|simulator)
type: string
required: false
default: ''
emsdk_version:
description: Emscripten SDK
type: string
required: false
default: 3.1.34
default: 3.1.72
outputs:
artifact:
description: "The name of the artifact"
Expand All @@ -50,7 +50,7 @@ jobs:
build:
outputs:
artifact: ${{ steps.init.outputs.artifact }}
runs-on: ${{ (inputs.target_os == 'ios' || inputs.target_os == 'mac') && 'macos-latest' || inputs.target_os == 'win' && 'windows-2022' || 'ubuntu-20.04' }}
runs-on: ${{ (inputs.target_os == 'ios' || inputs.target_os == 'mac') && 'macos-latest' || inputs.target_os == 'win' && 'windows-2022' || 'ubuntu-24.04' }}
steps:
- name: Initialize
id: init
Expand All @@ -59,26 +59,20 @@ jobs:
ARTIFACT="pdfium"
[ "${{inputs.enable_v8}}" == "true" ] && ARTIFACT="$ARTIFACT-v8"
ARTIFACT="$ARTIFACT-${{inputs.target_os}}"
[ "${{inputs.target_libc}}" != "" ] && ARTIFACT="$ARTIFACT-${{inputs.target_libc}}"
[ "${{inputs.target_environment}}" != "" ] && ARTIFACT="$ARTIFACT-${{inputs.target_environment}}"
[ "${{inputs.target_os}}" != "${{inputs.target_cpu}}" ] && ARTIFACT="$ARTIFACT-${{inputs.target_cpu}}"
[ "${{inputs.is_debug}}" == "true" ] && ARTIFACT="$ARTIFACT-debug"
echo "artifact=$ARTIFACT" >> $GITHUB_OUTPUT
- name: Checkout this repo
uses: actions/checkout@v4
- name: Workaround for libpcre2 i386 # https://github.com/actions/virtual-environments/issues/4589#issuecomment-1100899313
if: inputs.target_os == 'android'
run: |
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update -qq
sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
- name: Set environment variables
run: |
cat >>$GITHUB_ENV <<END
PDFium_BRANCH=${{ inputs.branch }}
PDFium_IS_DEBUG=${{ inputs.is_debug }}
PDFium_TARGET_CPU=${{ inputs.target_cpu }}
PDFium_TARGET_OS=${{ inputs.target_os }}
PDFium_TARGET_LIBC=${{ inputs.target_libc }}
PDFium_TARGET_ENVIRONMENT=${{ inputs.target_environment }}
PDFium_ENABLE_V8=${{ inputs.enable_v8 }}
PDFium_VERSION=${{ inputs.version }}
EMSDK_VERSION=${{ inputs.emsdk_version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/patch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ jobs:
if: always() && steps.checkout.outcome == 'success'
env:
PDFium_TARGET_OS: linux
PDFium_TARGET_LIBC: musl
PDFium_TARGET_ENVIRONMENT: musl
1 change: 0 additions & 1 deletion .github/workflows/trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ jobs:
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Build all
token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"
inputs: |
{
"branch": "${{ steps.chromium.outputs.branch }}",
Expand Down
Loading

0 comments on commit 9deaa5b

Please sign in to comment.