Add renovate.json #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build CI | |
on: [push, pull_request, workflow_dispatch] | |
env: | |
XPDF_VERSION: '4.02' | |
jobs: | |
build: | |
name: ${{ matrix.config.name }} Build | |
if: "! contains(github.event.head_commit.message, '[skip ci]')" | |
env: | |
BUILD_TYPE: Release | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { name: "Windows MSVC x86_64", os: windows-latest, cc: "cl", cxx: "cl", artifact: "vs2019.win64",cmake-configure-args: "-A x64"} | |
- { name: "Windows MSVC x86", os: windows-latest, cc: "cl", cxx: "cl", artifact: "vs2019.win32", cmake-configure-args: "-A Win32"} | |
- { name: "Ubuntu GCC x86_64", os: ubuntu-latest, cc: "gcc", cxx: "g++", artifact: "linux-gcc.x64", cmake-configure-args: "-G Ninja"} | |
- { name: "Ubuntu GCC x86", os: ubuntu-latest, cc: "gcc", cxx: "g++", artifact: "linux-gcc.x86", cmake-configure-args: "-G Ninja"} | |
- { name: "macOS Clang x86_64", os: macos-latest, cc: "clang", cxx: "clang++", artifact: "macos-clang.x64", cmake-configure-args: "-G Ninja"} | |
# - { name: "macOS Clang x86", os: macos-latest, cc: "gcc-9", cxx: "g++-9"} | |
steps: | |
- name: Checkout with Submodules | |
uses: actions/checkout@master | |
with: | |
submodules: true | |
- name: Setup CFLAGS && CXXFLAGS for x86 gcc & clang | |
run: | | |
echo "{CFLAGS}={-m32}" >> $GITHUB_ENV | |
echo "{CXXFLAGS}={-m32}" >> $GITHUB_ENV | |
shell: bash | |
if: (contains(matrix.config.name, '64') != true) && (contains(matrix.config.os, 'windows') != true) | |
- name: Install gcc-multilib & g++-multilib for x86 Ubuntu | |
run: sudo apt-get install gcc-multilib g++-multilib | |
shell: bash | |
if: (contains(matrix.config.name, '64') != true) && (contains(matrix.config.os, 'ubuntu') == true) | |
- name: Install MacOS Dependencies | |
shell: bash | |
run: brew install p7zip | |
if: contains(matrix.config.os, 'mac') == true | |
- name: Setup Ninja | |
uses: ashutoshvarma/[email protected] | |
with: | |
# ninja version to download. Default: 1.10.0 | |
version: 1.10.0 | |
- name: Build & Test | |
uses: ashutoshvarma/action-cmake-build@master | |
with: | |
cc: ${{ matrix.config.cc }} | |
cxx: ${{ matrix.config.cxx }} | |
configure-options: ${{ matrix.config.cmake-configure-args }} | |
ctest-options: -R xpdf | |
run-test: true | |
parallel: 14 | |
build-dir: ${{ runner.workspace }}/build | |
build-type: ${{ env.BUILD_TYPE }} | |
install-build: true | |
install-options: "--prefix install_dir" | |
- name: Build Library Artifact | |
if: success() | |
shell: bash | |
run: | | |
pack_dir="../package_xpdf" | |
build_dir=$(echo "${{ runner.workspace }}/build" | sed -e 's/\\/\\\\/g') | |
mkdir -p "$pack_dir"/include && mkdir -p "$pack_dir"/lib | |
cp $build_dir/xpdf-4.02/*.h xpdf-4.02/*.h xpdf-4.02/*/*.h "$pack_dir"/include | |
if [ "${{ matrix.config.os }}" == "windows-latest" ]; then | |
lib_path="$build_dir/xpdf-4.02/xpdf/${{ env.BUILD_TYPE }}/xpdf.lib" | |
else | |
lib_path="$build_dir/xpdf-4.02/xpdf/libxpdf.a" | |
fi | |
cp $lib_path $pack_dir/lib | |
7z a libxpdf-${{ env.XPDF_VERSION }}.${{ matrix.config.artifact }}.zip $pack_dir/* | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v1 | |
if: success() | |
with: | |
name: libxpdf-${{ env.XPDF_VERSION }}.${{ matrix.config.artifact }} | |
path: libxpdf-${{ env.XPDF_VERSION }}.${{ matrix.config.artifact }}.zip | |
Release: | |
runs-on: [ubuntu-latest] | |
strategy: | |
fail-fast: false | |
needs: [build] | |
name: Create Release with artifacts | |
if: success() && startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- name: Get Tag name | |
run: echo "::set-env name=TAG_NAME::${HEAD_REF#refs/tags/}" | |
env: | |
HEAD_REF: ${{ github.ref }} | |
- name: Create Archive Tarball | |
shell: bash | |
run: scripts/git-archive-all.sh --format tar.gz libxpdf-${{ env.XPDF_VERSION }}.tar.gz | |
- name: Download vs2019.win64 artifact | |
uses: actions/download-artifact@v1 | |
with: | |
name: libxpdf-${{ env.XPDF_VERSION }}.vs2019.win64 | |
- name: Download vs2019.win32 artifact | |
uses: actions/download-artifact@v1 | |
with: | |
name: libxpdf-${{ env.XPDF_VERSION }}.vs2019.win32 | |
- name: Download linux-gcc.x64 artifact | |
uses: actions/download-artifact@v1 | |
with: | |
name: libxpdf-${{ env.XPDF_VERSION }}.linux-gcc.x64 | |
- name: Download linux-gcc.x86 artifact | |
uses: actions/download-artifact@v1 | |
with: | |
name: libxpdf-${{ env.XPDF_VERSION }}.linux-gcc.x86 | |
- name: Download macos-clang.x64 artifact | |
uses: actions/download-artifact@v1 | |
with: | |
name: libxpdf-${{ env.XPDF_VERSION }}.macos-clang.x64 | |
- name: Create Release | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ env.TAG_NAME }} | |
name: libxpdf-${{ env.XPDF_VERSION }} - Release ${{ env.TAG_NAME }} | |
draft: false | |
prerelease: false | |
files: | | |
libxpdf-${{ env.XPDF_VERSION }}.vs2019.win64/libxpdf-${{ env.XPDF_VERSION }}.vs2019.win64.zip | |
libxpdf-${{ env.XPDF_VERSION }}.vs2019.win32/libxpdf-${{ env.XPDF_VERSION }}.vs2019.win32.zip | |
libxpdf-${{ env.XPDF_VERSION }}.linux-gcc.x64/libxpdf-${{ env.XPDF_VERSION }}.linux-gcc.x64.zip | |
libxpdf-${{ env.XPDF_VERSION }}.linux-gcc.x86/libxpdf-${{ env.XPDF_VERSION }}.linux-gcc.x86.zip | |
libxpdf-${{ env.XPDF_VERSION }}.macos-clang.x64/libxpdf-${{ env.XPDF_VERSION }}.macos-clang.x64.zip | |
libxpdf-${{ env.XPDF_VERSION }}.tar.gz | |