Skip to content

Commit

Permalink
Revert "Conda: add shell: bash -l {0}"
Browse files Browse the repository at this point in the history
This reverts commit e1e445d.
  • Loading branch information
reece394 committed Aug 12, 2024
1 parent e1e445d commit 56ecee9
Show file tree
Hide file tree
Showing 33 changed files with 180 additions and 402 deletions.
88 changes: 23 additions & 65 deletions .github/workflows/build-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,8 @@ on:
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
publish:
description: Publish release
type: boolean
required: false
default: false
Expand Down Expand Up @@ -278,32 +268,6 @@ jobs:
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_libc: 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
enable_v8: true

linux_musl_x64:
name: Linux musl x64
uses: ./.github/workflows/build.yml
Expand Down Expand Up @@ -531,8 +495,6 @@ jobs:
- 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
Expand All @@ -550,38 +512,29 @@ jobs:
- win_x86_v8
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v3
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"
nuget pack "$NUSPEC" -properties "version=${{ github.event.inputs.version || '0.0.0.0' }};branch=${GITHUB_REF#refs/heads/};commit=${GITHUB_SHA}"
echo "::endgroup::"
done
- name: Upload artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
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'
if: env.NUGET_API_KEY && startsWith(github.event.inputs.branch, 'chromium/') && github.event.inputs.version && github.event.inputs.publish == 'true'
run: nuget push -Source nuget.org -ApiKey ${{ secrets.NUGET_API_KEY }} *.nupkg
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
Expand All @@ -591,17 +544,20 @@ jobs:
if: github.event.inputs.version
runs-on: ubuntu-latest
needs:
- linux_arm
- linux_arm64
- linux_x64
- linux_x86
- mac_arm64
- mac_x64
- win_arm64
- win_x64
- win_x86
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v3
- name: Create build script
run: |
cat >conda-build.sh <<END
Expand All @@ -619,38 +575,42 @@ jobs:
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-32
run: ./conda-build.sh linux-32 pdfium-linux-x86
- 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 linux-armv7l
run: ./conda-build.sh linux-armv7l pdfium-linux-arm
- 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-32
run: ./conda-build.sh win-32 pdfium-win-x86
- 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
uses: actions/upload-artifact@v3
with:
name: Conda packages
path: conda/out/
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v3
uses: conda-incubator/setup-miniconda@v2
- 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'
if: env.ANACONDA_API_TOKEN && startsWith(github.event.inputs.branch, 'chromium/') && github.event.inputs.version && github.event.inputs.publish == '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'
if: startsWith(github.event.inputs.branch, 'chromium/') && github.event.inputs.version && github.event.inputs.publish == 'true'
runs-on: ubuntu-latest
needs:
- android_arm
Expand All @@ -669,8 +629,6 @@ jobs:
- 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
Expand All @@ -694,7 +652,7 @@ jobs:
- win_x86_v8
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v3
- name: Create tarballs
run: |
for DIR in pdfium-*; do
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/build-one.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ on:
type: boolean
required: false
default: false
emsdk_version:
description: Emscripten SDK
type: string
required: false
default: 3.1.34
is_debug:
description: Is debug
type: boolean
Expand All @@ -64,4 +59,3 @@ jobs:
target_cpu: ${{ github.event.inputs.target_cpu }}
target_libc: ${{ github.event.inputs.target_libc }}
enable_v8: ${{ github.event.inputs.enable_v8 == 'true' }}
emsdk_version: ${{ github.event.inputs.emsdk_version }}
19 changes: 9 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ on:
type: string
required: false
default: ''
emsdk_version:
description: Emscripten SDK
type: string
required: false
default: 3.1.34
outputs:
artifact:
description: "The name of the artifact"
Expand All @@ -50,7 +45,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-22.04' }}
runs-on: ${{ (inputs.target_os == 'ios' || inputs.target_os == 'mac') && 'macos-latest' || inputs.target_os == 'win' && 'windows-2019' || 'ubuntu-20.04' }}
steps:
- name: Initialize
id: init
Expand All @@ -64,7 +59,13 @@ jobs:
[ "${{inputs.is_debug}}" == "true" ] && ARTIFACT="$ARTIFACT-debug"
echo "artifact=$ARTIFACT" >> $GITHUB_OUTPUT
- name: Checkout this repo
uses: actions/checkout@v4
uses: actions/checkout@v3
- 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
Expand All @@ -75,7 +76,6 @@ jobs:
PDFium_TARGET_LIBC=${{ inputs.target_libc }}
PDFium_ENABLE_V8=${{ inputs.enable_v8 }}
PDFium_VERSION=${{ inputs.version }}
EMSDK_VERSION=${{ inputs.emsdk_version }}
MUSL_URL=${{ secrets.MUSL_URL }}
END
steps/00-environment.sh
Expand All @@ -86,7 +86,6 @@ jobs:
- name: Checkout PDFium
run: steps/02-checkout.sh
shell: bash
timeout-minutes: 15
- name: Apply patches
run: steps/03-patch.sh
shell: bash
Expand All @@ -111,7 +110,7 @@ jobs:
run: steps/07-stage.sh
shell: bash
- name: Upload artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: ${{ steps.init.outputs.artifact }}
path: staging/
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/mac-univ.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ jobs:
run: |
echo "artifact=${{inputs.artifact_x64}}" | sed "s/x64/univ/g" >> $GITHUB_OUTPUT
- name: Download ${{ inputs.artifact_x64 }}
uses: actions/download-artifact@v4
uses: actions/download-artifact@v3
with:
name: ${{ inputs.artifact_x64 }}
path: ${{ inputs.artifact_x64 }}
- name: Download ${{ inputs.artifact_arm64 }}
uses: actions/download-artifact@v4
uses: actions/download-artifact@v3
with:
name: ${{ inputs.artifact_arm64 }}
path: ${{ inputs.artifact_arm64 }}
Expand All @@ -45,7 +45,7 @@ jobs:
${{ inputs.artifact_x64 }}/lib/libpdfium.dylib \
-output ${{ steps.init.outputs.artifact }}/lib/libpdfium.dylib
- name: Upload artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: ${{ steps.init.outputs.artifact }}
path: ${{ steps.init.outputs.artifact }}
6 changes: 2 additions & 4 deletions .github/workflows/patch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout this repo
uses: actions/checkout@v4
uses: actions/checkout@v3

- name: Install depot_tools
run: |
Expand All @@ -23,10 +23,8 @@ jobs:
id: checkout
timeout-minutes: 15
run: |
PDFium_BRANCH=$(git ls-remote --sort version:refname --refs https://pdfium.googlesource.com/pdfium.git 'chromium/*' | tail -n 1 | cut -d/ -f3-4)
echo "Checking out branch $PDFium_BRANCH"
gclient config --unmanaged "https://pdfium.googlesource.com/pdfium.git" --custom-var "checkout_configuration=minimal"
gclient sync -r "origin/${PDFium_BRANCH}" --no-history --shallow
gclient sync --no-history --shallow
- name: Create patch script
run: |
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,16 @@ jobs:
BUILD=$(echo "$VERSION" | cut -d. -f3)
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "branch=chromium/$BUILD" >> $GITHUB_OUTPUT
- name: Get date
id: date
run: |
echo "day=$(date +%-d)" >> $GITHUB_OUTPUT
- name: Trigger build
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Build all
token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"
inputs: |
{
"branch": "${{ steps.chromium.outputs.branch }}",
"version": "${{ steps.chromium.outputs.version }}",
"is_debug": "false",
"enable_v8": "true",
"release": "true",
"nuget": "true",
"anaconda": "${{ steps.date.outputs.day <= 7 && 'true' || 'false' }}"
"publish": "true"
}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
/staging/
/build/
*.tgz
/*-musl*-cross/
/*-musl-cross/
/android-ndk*
/conda/out/
11 changes: 2 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

[![Latest release](https://img.shields.io/github/v/release/bblanchon/pdfium-binaries?display_name=release&label=github)](https://github.com/bblanchon/pdfium-binaries/releases/latest/)
[![Nuget](https://img.shields.io/nuget/v/bblanchon.PDFium)](https://www.nuget.org/packages/bblanchon.PDFium/)
[![Conda](https://img.shields.io/conda/v/bblanchon/pdfium-binaries?label=conda)](https://anaconda.org/bblanchon/pdfium-binaries)
![Conda](https://img.shields.io/conda/v/bblanchon/pdfium-binaries?label=conda)


This project hosts pre-compiled binaries of the [PDFium library](https://pdfium.googlesource.com/pdfium/), an open-source library for PDF manipulation and rendering.
Expand Down Expand Up @@ -87,12 +87,7 @@ Here are the download links for latest release:
</tr>

<tr>
<td rowspan="3">Linux<br>musl</td>
<td>arm64</td>
<td><a href="https://github.com/bblanchon/pdfium-binaries/releases/latest/download/pdfium-linux-musl-arm64.tgz">pdfium-linux-musl-arm64.tgz</a></td>
<td><a href="https://github.com/bblanchon/pdfium-binaries/releases/latest/download/pdfium-v8-linux-musl-arm64.tgz">pdfium-v8-linux-musl-arm64.tgz</a></td>
</tr>
<tr>
<td rowspan="2">Linux<br>musl</td>
<td>x64</td>
<td><a href="https://github.com/bblanchon/pdfium-binaries/releases/latest/download/pdfium-linux-musl-x64.tgz">pdfium-linux-musl-x64.tgz</a></td>
<td><a href="https://github.com/bblanchon/pdfium-binaries/releases/latest/download/pdfium-v8-linux-musl-x64.tgz">pdfium-v8-linux-musl-x64.tgz</a></td>
Expand Down Expand Up @@ -246,7 +241,6 @@ The following projects use (or recommend using) our PDFium builds:
| [PDFtoZPL][pdftozpl] | C# | A .NET library to convert PDF files (and bitmaps) into Zebra Programming Language code |
| [PDFx][pdfx] | Dart | Flutter Render & show PDF documents on Web, MacOs 10.11+, Android 5.0+, iOS and Windows |
| [PyPDFium2][pypdfium2] | Python | Python bindings to PDFium |
| [Spacedrive][spacedrive] | Rust/TS | Cross-platform file manager, powered by a virtual distributed filesystem |
| [wxPDFView][wxpdfview] | C++ | wxWidgets components to display PDF content |

*Did we miss a project? Please open a PR!*
Expand Down Expand Up @@ -318,4 +312,3 @@ The following projects use (or recommend using) our PDFium builds:
[pdflibcore]: https://github.com/jbaarssen/PdfLibCore
[dtronixpdf]: https://github.com/Dtronix/DtronixPdf
[pdftozpl]: https://github.com/sungaila/PDFtoZPL
[spacedrive]: https://github.com/spacedriveapp/spacedrive
Loading

0 comments on commit 56ecee9

Please sign in to comment.