diff options
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/ci_macos.yml | 91 | ||||
-rw-r--r-- | .github/workflows/ci_master.yml | 173 | ||||
-rw-r--r-- | .github/workflows/ci_ubuntu.yml | 156 | ||||
-rw-r--r-- | .github/workflows/ci_windows.yml | 73 | ||||
-rw-r--r-- | .github/workflows/ci_windows_mingw.yml | 79 |
5 files changed, 399 insertions, 173 deletions
diff --git a/.github/workflows/ci_macos.yml b/.github/workflows/ci_macos.yml new file mode 100644 index 0000000..734995f --- /dev/null +++ b/.github/workflows/ci_macos.yml @@ -0,0 +1,91 @@ +name: CI MacOS + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: RELWITHDEBINFO + +jobs: + CI: + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + continue-on-error: ${{ contains(matrix.os, 'macos') }} + strategy: + fail-fast: false + matrix: + name: [ "Linux x64 (Ubuntu 20.04)" ] + os: [ macos-latest ] + sanitize: [ false ] + build: + - { shell: bash } + include: + - name: "macOS (10.15) - Xcode 12.3" + os: macOS-latest + build: { shell: bash } +# - name: "macOS (10.15) - Xcode 12.3 - M1" +# os: macos-m1 +# build: { shell: "/usr/bin/arch -arch arm64e /bin/bash -l {0}" } + + defaults: + run: + shell: ${{ matrix.build.shell }} + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install dependencies + run: | + brew install libheif libjpeg-turbo libimagequant libde265 x265 + + - name: Prepare environment + + run: | + sudo xcode-select --switch /Library/Developer/CommandLineTools/ + echo "JOBS=$(sysctl -n hw.logicalcpu)" >> $GITHUB_ENV + echo "PKG_CONFIG_PATH=/usr/local/opt/jpeg-turbo/lib/pkgconfig" >> $GITHUB_ENV + echo "CFLAGS=-I/opt/X11/include -I/usr/local/Cellar/libpng/1.6.37/include/libpng16" >> $GITHUB_ENV + echo "LDFLAGS=-L/usr/local/Cellar/libpng/1.6.37/lib" >> $GITHUB_ENV + echo "CPATH=/usr/local/include:/usr/local/Cellar/libpng/1.6.37/include/libpng16" >> $GITHUB_ENV + echo "C_INCLUDE_PATH=/usr/local/lib:/usr/local/Cellar/libpng/1.6.37/include/libpng16:/usr/local/opt/openssl/include" >> $GITHUB_ENV + echo "LIBRARY_PATH=/usr/local/Cellar/libpng/1.6.37/lib:/usr/local/lib" >> $GITHUB_ENV + pkg-config --libs --cflags libpng + pkg-config --libs libpng + pkg-config --libs --cflags libpng16 + pkg-config --libs libpng16 + ls /usr/local/Cellar/libpng/1.6.37/ + ls /usr/local/Cellar/libpng/1.6.37/lib/ + ${{github.workspace}}/.github/scripts/removemono.sh + + - name: Configure CMake + # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. + # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type + run: cmake -DENABLE_PNG=1 -DENABLE_FREETYPE=1 -DENABLE_JPEG=1 -DENABLE_WEBP=1 + -DENABLE_TIFF=1 -DENABLE_GD_FORMATS=1 -DENABLE_CPP=0 -DENABLE_HEIF=1 -D CMAKE_PREFIX_PATH=/usr/local + -DBUILD_TEST=1 -DVERBOSE_MAKEFILE=1 -DPNG_PNG_INCLUDE_DIR=/usr/local/Cellar/libpng/1.6.37/include -DPNG_PNG_LIBRARY_DIR=/usr/local/Cellar/libpng/1.6.37/lib -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + + - name: Build + # Build your program with the given configuration + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel 4 + + - name: Test + working-directory: ${{github.workspace}}/build + # Execute tests defined by the CMake configuration. + # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail + run: | + export TMP=${{runner.temp}} + echo "TMP=${{github.temp}}" >> $GITHUB_ENV + echo "LSAN_OPTIONS=suppressions=${{ github.workspace }}/suppressions/lsan.supp" >> $GITHUB_ENV + CTEST_OUTPUT_ON_FAILURE=1 ctest -C ${{env.BUILD_TYPE}} + + - name: Output Log + if: contains(matrix.os, 'ubuntu') + run: | + if test -f "/home/runner/work/libgd/libgd/build/Testing/Temporary/LastTest.log"; then + cat /home/runner/work/libgd/libgd/build/Testing/Temporary/LastTest.log + fi diff --git a/.github/workflows/ci_master.yml b/.github/workflows/ci_master.yml deleted file mode 100644 index bf3f165..0000000 --- a/.github/workflows/ci_master.yml +++ /dev/null @@ -1,173 +0,0 @@ -name: CI Master - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -env: - # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) - BUILD_TYPE: Debug - -jobs: - CI: - name: ${{ matrix.name }} - runs-on: ${{ matrix.os }} - continue-on-error: ${{ contains(matrix.os, 'macos') }} - strategy: - fail-fast: false - matrix: - name: [ "Linux x64 (Ubuntu 20.04)" ] - os: [ ubuntu-20.04 ] - sanitize: [ false ] - build: - - { shell: bash } - include: - - name: "Linux x64 (Ubuntu 20.04)" - os: ubuntu-20.04 - build: { shell: bash } - - name: "macOS (10.15) - Xcode 12.3" - os: macOS-latest - build: { shell: bash } -# - name: "macOS (10.15) - Xcode 12.3 - M1" -# os: macos-m1 -# build: { shell: "/usr/bin/arch -arch arm64e /bin/bash -l {0}" } - - name: "Windows 2019 x64" - os: windows-2019 - build: { shell: powershell } - - defaults: - run: - shell: ${{ matrix.build.shell }} - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Update apt - if: contains(matrix.os, 'ubuntu') - env: - DEBIAN_FRONTEND: noninteractive - run: sudo -E apt-get update -qq -o Acquire::Retries=3 - - - name: Add libheif PPA - if: contains(matrix.os, 'ubuntu') - run: | - sudo add-apt-repository ppa:strukturag/libde265 - sudo add-apt-repository ppa:strukturag/libheif - - - name: install Ubuntu dependencies - if: contains(matrix.os, 'ubuntu') - env: - DEBIAN_FRONTEND: noninteractive - run: sudo -E apt-get install --fix-missing -qq -o Acquire::Retries=3 - libjpeg-turbo8-dev libimagequant-dev libde265-dev - libpng-dev libwebp-dev libtiff5-dev libx265-dev - libheif-dev libfreetype-dev libheif-dev - libavifile-0.7-dev libxpm-dev libraqm-dev - - - name: Install macOS dependencies - if: contains(matrix.os, 'macos') - run: | - brew install libheif libjpeg-turbo libimagequant libde265 x265 - - - name: Prepare macOS environment - if: contains(matrix.os, 'macos') - run: | - sudo xcode-select --switch /Library/Developer/CommandLineTools/ - echo "JOBS=$(sysctl -n hw.logicalcpu)" >> $GITHUB_ENV - echo "PKG_CONFIG_PATH=/usr/local/opt/jpeg-turbo/lib/pkgconfig" >> $GITHUB_ENV - echo "CFLAGS=-I/opt/X11/include -I/usr/local/Cellar/libpng/1.6.37/include/libpng16" >> $GITHUB_ENV - echo "LDFLAGS=-L/usr/local/Cellar/libpng/1.6.37/lib" >> $GITHUB_ENV - echo "CPATH=/usr/local/include:/usr/local/Cellar/libpng/1.6.37/include/libpng16" >> $GITHUB_ENV - echo "C_INCLUDE_PATH=/usr/local/lib:/usr/local/Cellar/libpng/1.6.37/include/libpng16:/usr/local/opt/openssl/include" >> $GITHUB_ENV - echo "LIBRARY_PATH=/usr/local/Cellar/libpng/1.6.37/lib:/usr/local/lib" >> $GITHUB_ENV - pkg-config --libs --cflags libpng - pkg-config --libs libpng - pkg-config --libs --cflags libpng16 - pkg-config --libs libpng16 - ls /usr/local/Cellar/libpng/1.6.37/ - ls /usr/local/Cellar/libpng/1.6.37/lib/ - ${{github.workspace}}/.github/scripts/removemono.sh - - - name: Configure CMake MacOS - if: contains(matrix.os, 'macos') - # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. - # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -DENABLE_PNG=1 -DENABLE_FREETYPE=1 -DENABLE_JPEG=1 -DENABLE_WEBP=1 - -DENABLE_TIFF=1 -DENABLE_GD_FORMATS=1 -DENABLE_CPP=0 -DENABLE_HEIF=1 -D CMAKE_PREFIX_PATH=/usr/local - -DBUILD_TEST=1 -DVERBOSE_MAKEFILE=1 -DPNG_PNG_INCLUDE_DIR=/usr/local/Cellar/libpng/1.6.37/include -DPNG_PNG_LIBRARY_DIR=/usr/local/Cellar/libpng/1.6.37/lib -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} - - - name: Install Dependencies Windows - if: contains(matrix.os, 'Windows') - run: | - $Env:VCPKG_DEFAULT_TRIPLET="x64-windows" - C:\vcpkg\vcpkg.exe install libpng libjpeg-turbo freetype tiff libheif libwebp - - - name: Configure CMake Windows x64 - if: contains(matrix.os, 'Windows') - # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. - # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -DENABLE_PNG=1 -DENABLE_FREETYPE=1 -DENABLE_JPEG=1 -DENABLE_GD_FORMATS=1 -DENABLE_TIFF=1 - -DENABLE_HEIF=1 - -DBUILD_TEST=1 -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} - -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake - - - name: Configure CMake Ubuntu - if: contains(matrix.os, 'ubuntu') - # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. - # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -DENABLE_PNG=1 -DENABLE_FREETYPE=1 -DENABLE_JPEG=1 -DENABLE_WEBP=1 - -DENABLE_TIFF=1 -DENABLE_XPM=1 -DENABLE_GD_FORMATS=1 -DENABLE_HEIF=1 -DENABLE_RAQM=1 - -DBUILD_TEST=1 -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} - - - name: Build - # Build your program with the given configuration - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel 4 - - - name: Test Ubuntu - if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos') - working-directory: ${{github.workspace}}/build - # Execute tests defined by the CMake configuration. - # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail - run: | - echo "LSAN_OPTIONS=suppressions=${{ github.workspace }}/suppressions/lsan.supp" >> $GITHUB_ENV - CTEST_OUTPUT_ON_FAILURE=1 ctest -C ${{env.BUILD_TYPE}} - - - name: Test Windows - if: contains(matrix.os, 'windows') - working-directory: ${{github.workspace}}/build - # Execute tests defined by the CMake configuration. - # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail - run: | - $Env:CTEST_OUTPUT_ON_FAILURE=1 - ctest -C ${{env.BUILD_TYPE}} - - - name: Configure CMake ASAN Ubuntu - if: contains(matrix.os, 'ubuntu') - # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. - # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -DENABLE_PNG=1 -DENABLE_FREETYPE=1 -DENABLE_JPEG=1 -DENABLE_WEBP=1 - -DENABLE_TIFF=1 -DENABLE_XPM=1 -DENABLE_GD_FORMATS=1 -DENABLE_HEIF=1 - -DBUILD_TEST=1 -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} - - - name: Build ASAN Ubuntu - if: contains(matrix.os, 'ubuntu') - # Build your program with the given configuration - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - - - name: Test ASAN Ubuntu - if: contains(matrix.os, 'ubuntu') - working-directory: ${{github.workspace}}/build - # Execute tests defined by the CMake configuration. - # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail - run: CTEST_OUTPUT_ON_FAILURE=1 ctest -C ${{env.BUILD_TYPE}} - - - - name: Output Log - if: contains(matrix.os, 'ubuntu') - run: | - if test -f "/home/runner/work/libgd/libgd/build/Testing/Temporary/LastTest.log"; then - cat /home/runner/work/libgd/libgd/build/Testing/Temporary/LastTest.log - fi diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml new file mode 100644 index 0000000..9e0abdb --- /dev/null +++ b/.github/workflows/ci_ubuntu.yml @@ -0,0 +1,156 @@ +name: CI Ubuntu + +on: + push: + branches: + - 'features/mingw-ci' + pull_request: + + workflow_dispatch: + + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: RELWITHDEBINFO + +jobs: + CI: + runs-on: ${{ matrix.config.os }} + strategy: + fail-fast: false + matrix: + config: + - { + name: "Ubuntu Intel GCC", + os: ubuntu-latest, + cc: "gcc", + cxx: "g++", + cflags: "-msse2" + } + - { + name: "Ubuntu Intel Clang", + os: ubuntu-latest, + cc: "clang-12", + cxx: "clang-cpp-12" + } + - { + name: "Ubuntu Graviton GCC", + os: [self-hosted, Linux, ARM64, graviton], + cc: "gcc", + cxx: "g++", + cflags: "-march=armv8.2-a+fp16+rcpc+dotprod+crypto+sve -mtune=neoverse-n1" + } + + name: ${{ matrix.config.name }} + defaults: + run: + shell: bash + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Update apt (Ubuntu) + env: + DEBIAN_FRONTEND: noninteractive + run: sudo -E apt-get update -qq -o Acquire::Retries=3 + + - name: Add libheif PPA (Ubuntu) + run: | + sudo add-apt-repository ppa:strukturag/libde265 + sudo add-apt-repository ppa:strukturag/libheif + + - name: install dependencies + env: + DEBIAN_FRONTEND: noninteractive + run: sudo -E apt-get install --fix-missing -qq -o Acquire::Retries=3 cmake clang-12 gcc build-essential libjpeg-turbo8-dev libimagequant-dev libde265-dev libpng-dev libwebp-dev libtiff5-dev libx265-dev libheif-dev libfreetype-dev libheif-dev libavifile-0.7-dev libxpm-dev libraqm-dev dh-autoreconf + + - name: Debug CC Env + env: + CC: ${{ matrix.config.cc }} + CXX: ${{ matrix.config.cxx }} + CFLAGS: ${{ matrix.config.cflags }} + run: | + echo ${{ matrix.config.cc }} + echo ${{ matrix.config.cxx }} + echo ${{ matrix.config.cflags }} + + - name: Configure CMake Clang + if: contains(matrix.config.cc, 'clang') + env: + CC: ${{ matrix.config.cc }} + CXX: ${{ matrix.config.cxx }} + CFLAGS: ${{ matrix.config.cflags }} + run: + cmake -G "Unix Makefiles" -DENABLE_PNG=1 -DENABLE_FREETYPE=1 -DENABLE_JPEG=1 -DENABLE_WEBP=1 + -DENABLE_TIFF=1 -DENABLE_XPM=1 -DENABLE_GD_FORMATS=1 -DENABLE_HEIF=1 -DENABLE_RAQM=1 + -DBUILD_TEST=1 -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/cmake/modules/linux-clang.cmake + + - name: Configure CMake gcc + if: contains(matrix.config.cc, 'gcc') + env: + CC: ${{ matrix.config.cc }} + CXX: ${{ matrix.config.cxx }} + CFLAGS: ${{ matrix.config.cflags }} + run: + cmake -DENABLE_PNG=1 -DENABLE_FREETYPE=1 -DENABLE_JPEG=1 -DENABLE_WEBP=1 + -DENABLE_TIFF=1 -DENABLE_XPM=1 -DENABLE_GD_FORMATS=1 -DENABLE_HEIF=1 -DENABLE_RAQM=1 + -DBUILD_TEST=1 -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + + - name: Build + env: + CC: ${{ matrix.config.cc }} + CXX: ${{ matrix.config.cxx }} + CFLAGS: ${{ matrix.config.cflags }} + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel 4 + + - name: Test + if: contains(matrix.config.cc, 'gcc') + working-directory: ${{github.workspace}}/build + run: | + export TMP=${{runner.temp}} + echo "TMP=${{github.temp}}" >> $GITHUB_ENV + echo "LSAN_OPTIONS=suppressions=${{ github.workspace }}/suppressions/lsan.supp" >> $GITHUB_ENV + CTEST_OUTPUT_ON_FAILURE=1 ctest -C ${{env.BUILD_TYPE}} + + - name: Configure CMake ASAN + env: + CC: ${{ matrix.config.cc }} + CXX: ${{ matrix.config.cxx }} + CFLAGS: ${{ matrix.config.cflags }} + if: contains(matrix.config.cc, 'gcc') + run: + cmake -DENABLE_PNG=1 -DENABLE_FREETYPE=1 -DENABLE_JPEG=1 -DENABLE_WEBP=1 + -DENABLE_TIFF=1 -DENABLE_XPM=1 -DENABLE_GD_FORMATS=1 -DENABLE_HEIF=1 + -DBUILD_TEST=1 -B ${{github.workspace}}/buildasan -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + + - name: Build ASAN + if: contains(matrix.config.cc, 'gcc') + env: + CC: ${{ matrix.config.cc }} + CXX: ${{ matrix.config.cxx }} + CFLAGS: "-march=armv8.2-a+fp16+rcpc+dotprod+crypto -mtune=neoverse-n1" + run: cmake --build ${{github.workspace}}/buildasan --config ${{env.BUILD_TYPE}} + + - name: Test ASAN + if: contains(matrix.config.cc, 'gcc') + working-directory: ${{github.workspace}}/buildasan + run: | + export TMP=${{runner.temp}} + echo "TMP=${{github.temp}}" >> $GITHUB_ENV + CTEST_OUTPUT_ON_FAILURE=1 ctest -C ${{env.BUILD_TYPE}} + + - name: Configure and Make + working-directory: ${{github.workspace}}/ + run: | + ./bootstrap.sh + ./configure --with-png --with-jpeg --with-ramq --with-heif --with-xpm --with-tiff --with-webp --with-liq --enable-gd --enable-gd-formats --with-zlib + make + make dist + + - name: Output Log + run: | + if test -f "/home/runner/work/libgd/libgd/build/Testing/Temporary/LastTest.log"; then + cat /home/runner/work/libgd/libgd/build/Testing/Temporary/LastTest.log + fi diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml new file mode 100644 index 0000000..725bc0b --- /dev/null +++ b/.github/workflows/ci_windows.yml @@ -0,0 +1,73 @@ +name: CI Windows + +on: + push: + branches: + - 'features/mingw-ci' + pull_request: + + workflow_dispatch: + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: RELWITHDEBINFO + +jobs: + CI: + runs-on: windows-latest + strategy: + matrix: + arch: + - x64 + - x86 + - amd64_arm64 + name: ${{ matrix.arch }} + defaults: + run: + shell: cmd + + steps: + - name: Checkout code + uses: actions/checkout@v2 + - uses: ilammy/msvc-dev-cmd@v1 + with: + arch: ${{ matrix.arch }} + + - name: Install Dependencies + run: | + curl -o ${{ matrix.arch }}-windows.7z https://raw.githubusercontent.com/libgd/libgd-windows-vcpkg-prebuild/main/${{matrix.arch}}-windows.7z + 7z.exe x ${{ matrix.arch }}-windows.7z -o${{github.workspace}}\vcpkgusr + + - name: Configure CMake + # vcpkg libde265 fails on arm64 and match prefix + if: matrix.arch == 'amd64_arm64' + run: cmake -D CMAKE_GENERATOR="NMake Makefiles" -DENABLE_PNG=1 -DENABLE_FREETYPE=1 -DENABLE_JPEG=1 + -DENABLE_GD_FORMATS=1 -DENABLE_TIFF=1 -DBUILD_TEST=1 + -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + -DCMAKE_LIBRARY_PATH=${{github.workspace}}\vcpkgusr\arm64-windows\lib + -DCMAKE_INCLUDE_PATH=${{github.workspace}}\vcpkgusr\arm64-windows\include + + - name: Configure CMake + if: matrix.arch != 'amd64_arm64' + run: cmake -D CMAKE_GENERATOR="NMake Makefiles" -DENABLE_PNG=1 -DENABLE_FREETYPE=1 -DENABLE_JPEG=1 + -DENABLE_GD_FORMATS=1 -DENABLE_TIFF=1 -DENABLE_HEIF=1 + -DBUILD_TEST=1 -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + -DCMAKE_LIBRARY_PATH=${{github.workspace}}\vcpkgusr\${{ matrix.arch }}-windows\lib + -DCMAKE_INCLUDE_PATH=${{github.workspace}}\vcpkgusr\${{ matrix.arch }}-windows\include + + - name: Build + run: | + cd ${{github.workspace}}/build + nmake + + - name: Tests + working-directory: ${{github.workspace}}/build + # skip test for cross builds + if: matrix.arch != 'amd64_arm64' + run: | + echo ${{runner.temp}} + echo %TMP% + echo %TEMP% + set PATH=${{github.workspace}}\vcpkgusr\${{ matrix.arch }}-windows\bin;%PATH% + set CTEST_OUTPUT_ON_FAILURE=1 + nmake test diff --git a/.github/workflows/ci_windows_mingw.yml b/.github/workflows/ci_windows_mingw.yml new file mode 100644 index 0000000..23f92e7 --- /dev/null +++ b/.github/workflows/ci_windows_mingw.yml @@ -0,0 +1,79 @@ +name: CI Windows Mingw
+
+on:
+ push:
+ branches:
+ - 'features/mingw-ci'
+ pull_request:
+
+ workflow_dispatch:
+
+env:
+ # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
+ BUILD_TYPE: RELWITHDEBINFO
+
+jobs:
+
+
+ win-build:
+ runs-on: windows-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - { icon: '⬛', sys: mingw32, env: i686 }
+ - { icon: '🟦', sys: mingw64, env: x86_64 }
+ - { icon: '🟨', sys: ucrt64, env: ucrt-x86_64 } # Experimental!
+# - { icon: '🟧', sys: clang64, env: clang-x86_64 } # Experimental!
+ name: 🚧${{ matrix.icon }}-${{ matrix.sys }}
+ defaults:
+ run:
+ shell: msys2 {0}
+ env:
+ MINGW_ARCH: ${{ matrix.sys }}
+ steps:
+
+ - name: '⚙️ git config'
+ run: git config --global core.autocrlf input
+ shell: bash
+
+ - name: '🧰 Checkout'
+ uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+
+ - name: '${{ matrix.icon }} Setup MSYS2'
+ uses: msys2/setup-msys2@v2
+ with:
+ msystem: ${{ matrix.sys }}
+ update: true
+ install: >
+ git
+ base-devel
+ tree
+ mingw-w64-${{ matrix.env }}-toolchain
+ mingw-w64-${{ matrix.env }}-libpng
+ mingw-w64-${{ matrix.env }}-libjpeg-turbo
+ mingw-w64-${{ matrix.env }}-freetype
+ mingw-w64-${{ matrix.env }}-libtiff
+ mingw-w64-${{ matrix.env }}-libwebp
+ mingw-w64-${{ matrix.env }}-libheif
+ mingw-w64-${{ matrix.env }}-libraqm
+ mingw-w64-${{ matrix.env }}-libimagequant
+ mingw-w64-${{ matrix.env }}-libavif
+ mingw-w64-${{ matrix.env }}-cmake
+
+ - name: '🚧 Cmake Configure'
+ run: |
+ MSYSTEM=MINGW64 cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DENABLE_PNG=1 -DENABLE_FREETYPE=1 -DENABLE_XPM=0 -DENABLE_JPEG=1 -DENABLE_WEBP=0 -DENABLE_TIFF=1 -DENABLE_XPM=0 -DENABLE_GD_FORMATS=1 -DENABLE_HEIF=1 -DENABLE_RAQM=1 -DBUILD_TEST=1 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -B.
+
+ - name: Build
+ run: cmake --build . --config ${{env.BUILD_TYPE}} --parallel 4
+
+ - name: Run tests
+ working-directory: ${{github.workspace}}
+ run: |
+ mkdir tmp
+ export TMP=${{github.workspace}}\\tmp
+ export CTEST_OUTPUT_ON_FAILURE=1
+ ctest -C ${{env.BUILD_TYPE}}
|