Skip to content

update pdfium version to 5968 #303

update pdfium version to 5968

update pdfium version to 5968 #303

Workflow file for this run

name: macOS
on:
push:
paths-ignore:
- '**.md'
- 'docs/**'
- 'extras/images/**'
env:
CMAKE_VERSION: "3.24.0"
NINJA_VERSION: "1.10.0"
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- { name: "macOS", os: "macos-12", target: "macos" }
python-version: [3.7]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade PIP
run: python3 -m pip install --upgrade pip setuptools wheel
- name: Display Python version
run: python3 --version
- name: Display PIP version
run: python3 -m pip --version
- name: Install Ninja and CMake
id: cmake_and_ninja
shell: cmake -P {0}
run: |
set(cmake_version $ENV{CMAKE_VERSION})
set(ninja_version $ENV{NINJA_VERSION})
message(STATUS "Using host CMake version: ${CMAKE_VERSION}")
if ("${{ runner.os }}" STREQUAL "Windows")
set(ninja_suffix "win.zip")
set(cmake_suffix "win64-x64.zip")
set(cmake_dir "cmake-${cmake_version}-win64-x64/bin")
elseif ("${{ runner.os }}" STREQUAL "Linux")
set(ninja_suffix "linux.zip")
set(cmake_suffix "Linux-x86_64.tar.gz")
set(cmake_dir "cmake-${cmake_version}-Linux-x86_64/bin")
elseif ("${{ runner.os }}" STREQUAL "macOS")
set(ninja_suffix "mac.zip")
set(cmake_suffix "Darwin-x86_64.tar.gz")
set(cmake_dir "cmake-${cmake_version}-Darwin-x86_64/CMake.app/Contents/bin")
endif()
set(ninja_url "https://github.com/ninja-build/ninja/releases/download/v${ninja_version}/ninja-${ninja_suffix}")
file(DOWNLOAD "${ninja_url}" ./ninja.zip SHOW_PROGRESS)
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf ./ninja.zip)
set(cmake_url "https://github.com/Kitware/CMake/releases/download/v${cmake_version}/cmake-${cmake_version}-${cmake_suffix}")
file(DOWNLOAD "${cmake_url}" ./cmake.zip SHOW_PROGRESS)
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf ./cmake.zip)
# Save the path for other steps
file(TO_CMAKE_PATH "$ENV{GITHUB_WORKSPACE}/${cmake_dir}" cmake_dir)
message("::set-output name=cmake_dir::${cmake_dir}")
if (NOT "${{ runner.os }}" STREQUAL "Windows")
execute_process(
COMMAND chmod +x ninja
COMMAND chmod +x ${cmake_dir}/cmake
)
endif()
- name: Python requirements
run: python3 -m pip install -r requirements.txt --user
- name: Depot tools
run: python3 make.py build-depot-tools
- name: Environment
run: |
echo "$PWD/build/depot-tools" >> $GITHUB_PATH
echo "FORCE_MAC_SDK_MIN=10.15" >> $GITHUB_ENV
- name: PDFium
run: python3 make.py build-pdfium-${{ matrix.config.target }}
- name: Patch
run: python3 make.py patch-${{ matrix.config.target }}
- name: Patch - Check
run: python3 make.py patch-${{ matrix.config.target }}
- name: Build
run: python3 make.py build-${{ matrix.config.target }}
- name: Install
run: python3 make.py install-${{ matrix.config.target }}
- name: Test
run: python3 make.py test-${{ matrix.config.target }}
- name: Archive
run: python3 make.py archive-${{ matrix.config.target }}
- name: Save
uses: actions/upload-artifact@v2
with:
name: artifact-${{ matrix.config.target }}
path: ${{ matrix.config.target }}.tgz
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: [build]
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Load
uses: actions/download-artifact@v2
with:
name: artifact-macos
- name: Get release
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload release asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: macos.tgz
asset_name: macos.tgz
asset_content_type: application/tar+gzip