From 6b5946fea0320f5aa8d03da830cea7dc8ab092fe Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Fri, 27 Aug 2021 18:16:19 +0700 Subject: Mingw support, and refactor a bit gdTest on Windows, simplifies --- tests/gdtest/gdtest.c | 137 +++++++++++++++++++++++++++----------------------- 1 file changed, 74 insertions(+), 63 deletions(-) diff --git a/tests/gdtest/gdtest.c b/tests/gdtest/gdtest.c index 832f27a..33b263e 100644 --- a/tests/gdtest/gdtest.c +++ b/tests/gdtest/gdtest.c @@ -8,6 +8,7 @@ #include #include #include +#include #ifdef HAVE_DIRENT_H #include @@ -22,10 +23,14 @@ #include #endif -#ifdef _WIN32 +#if defined(_WIN32) && !defined(__MINGW32__) && !defined(__MINGW64__) #include "readdir.h" #include #endif +#if defined(__MINGW32__) && defined(__MINGW64__) +# define lstat stat +#endif +#include "gd_intern.h" /* GDTEST_TOP_DIR is defined in other compile ways except msys * test_config.h is created by windows/msys/run_test.sh*/ @@ -94,7 +99,7 @@ static void _clean_dir(const char *dir) if (strcmp(de->d_name, ".") == 0 || strcmp(de->d_name, "..") == 0) continue; -#ifdef _WIN32 +#if defined(_WIN32) && !defined(__MINGW32__) && !defined(__MINGW64__) { WIN32_FILE_ATTRIBUTE_DATA data; @@ -133,26 +138,7 @@ static void tmpdir_cleanup(void) free(tmpdir_base); } -#ifdef _WIN32 -char* strrstr (char* haystack, char* needle) -{ - int needle_length = strlen(needle); - char * haystack_end = haystack + strlen(haystack) - needle_length; - char * p; - int i; - - for(p = haystack_end; p >= haystack; --p) - { - for(i = 0; i < needle_length; ++i) { - if(p[i] != needle[i]) - goto next; - } - return p; - - next:; - } - return 0; -} +#if defined(_WIN32) && !defined(__MINGW32__) && !defined(__MINGW64__) typedef VOID (WINAPI *MyGetSystemTimeAsFileTime)(LPFILETIME lpSystemTimeAsFileTime); @@ -203,6 +189,39 @@ static int getfilesystemtime(struct timeval *tv) return 0; } +#endif +#if defined(_WIN32) + +static void randtemplate(char *template, size_t l) { + for (int i = l - 6; i < l; i++) { + int r = rand (); + if ((r / (RAND_MAX + 1)) > ((RAND_MAX + 1) / 2)) + template[i] = 'A' + (double) rand () / (RAND_MAX + 1) * ('Z' - 'A'); + else + template[i] = 'a' + (double) rand () / (RAND_MAX + 1) * ('z' - 'a'); + } +} + +char* strrstr (char* haystack, char* needle) +{ + int needle_length = strlen(needle); + char * haystack_end = haystack + strlen(haystack) - needle_length; + char * p; + int i; + + for(p = haystack_end; p >= haystack; --p) + { + for(i = 0; i < needle_length; ++i) { + if(p[i] != needle[i]) + goto next; + } + return p; + + next:; + } + return 0; +} + static char * mkdtemp (char *tmpl) @@ -214,45 +233,32 @@ mkdtemp (char *tmpl) struct timeval tv; __int64 value; int count; + size_t l; + char attempts = 5; + int res = 0; - /* find the last occurrence of "XXXXXX" */ - XXXXXX = strrstr(tmpl, "XXXXXX"); - - if (!XXXXXX || strncmp (XXXXXX, "XXXXXX", 6)) { + if (tmpl == NULL) { errno = EINVAL; return NULL; } - /* Get some more or less random data. */ - getfilesystemtime(&tv); - value = (tv.tv_usec ^ tv.tv_sec) + counter++; - - for (count = 0; count < 100; value += 7777, ++count) { - __int64 v = value; - - /* Fill in the random bits. */ - XXXXXX[0] = letters[v % NLETTERS]; - v /= NLETTERS; - XXXXXX[1] = letters[v % NLETTERS]; - v /= NLETTERS; - XXXXXX[2] = letters[v % NLETTERS]; - v /= NLETTERS; - XXXXXX[3] = letters[v % NLETTERS]; - v /= NLETTERS; - XXXXXX[4] = letters[v % NLETTERS]; - v /= NLETTERS; - XXXXXX[5] = letters[v % NLETTERS]; - - /* tmpl is in UTF-8 on Windows, thus use g_mkdir() */ - if (mkdir(tmpl) == 0) { - return tmpl; - } - printf("failed to create directory\n"); - if (errno != EEXIST) - /* Any other error will apply also to other names we might - * try, and there are 2^32 or so of them, so give up now. - */ - return NULL; + l = strlen (tmpl); + if (l < 6 || strcmp (&tmpl[l - 6], "XXXXXX") != 0) { + errno = EINVAL; + return NULL; + } + srand(time (NULL)); + do { + randtemplate (tmpl, l); + res = mkdir(tmpl); + attempts--; + } while (attempts > 0 && res != 0 ); + + if (res == 0) { + return tmpl; + } + if (errno != EEXIST) { + return NULL; } /* We got out of the loop because we ran out of combinations to try. */ @@ -265,22 +271,27 @@ const char *gdTestTempDir(void) { if (tmpdir_base == NULL) { char *tmpdir; -#ifdef _WIN32 - char tmpdir_root[MAX_PATH]; +#if defined(_WIN32) && !defined(__MINGW32__) && !defined(__MINGW64__) + char tmpdir_root[MAXPATHLEN]; size_t tmpdir_root_len = GetTempPath(MAX_PATH, tmpdir_root); gdTestAssert(!(tmpdir_root_len > MAX_PATH || (tmpdir_root_len == 0))); gdTestAssert((tmpdir_root_len + 30 < MAX_PATH)); #else char *tmpdir_root; tmpdir_root = getenv("TMPDIR"); - if (tmpdir_root == NULL) - tmpdir_root = "/tmp"; + if (tmpdir_root == NULL) { + // Mingw defines it + tmpdir_root = getenv("TMP"); + if (tmpdir_root == NULL) { + tmpdir_root = "/tmp"; + } + } #endif /* The constant here is a lazy over-estimate. */ tmpdir = malloc(strlen(tmpdir_root) + 30); gdTestAssert(tmpdir != NULL); -#ifdef _WIN32 +#if defined(_WIN32) sprintf(tmpdir, "%sgdtest.XXXXXX", tmpdir_root); #else sprintf(tmpdir, "%s/gdtest.XXXXXX", tmpdir_root); @@ -299,7 +310,7 @@ char *gdTestTempFile(const char *template) const char *tempdir = gdTestTempDir(); char *ret; -#ifdef _WIN32 +#if defined(_WIN32) && !defined(__MINGW32__) && !defined(__MINGW64__) { char *tmpfilename; UINT error; @@ -364,7 +375,7 @@ char *gdTestFilePathV(const char *path, va_list args) strcpy(file, GDTEST_TOP_DIR); p = path; do { -#ifdef _WIN32 +#if defined(_WIN32) && !defined(__MINGW32__) && !defined(__MINGW64__) strcat(file, "\\"); #else strcat(file, "/"); -- cgit v1.2.1 From 25cd6fe420f4a511279968ca7a84401e6dcf425e Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Fri, 27 Aug 2021 20:47:37 +0700 Subject: add mingw64 CI, setup and cmake configure --- .github/workflows/ci_master.yml | 45 +++++++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci_master.yml b/.github/workflows/ci_master.yml index bf3f165..77b3272 100644 --- a/.github/workflows/ci_master.yml +++ b/.github/workflows/ci_master.yml @@ -36,7 +36,9 @@ jobs: - name: "Windows 2019 x64" os: windows-2019 build: { shell: powershell } - + - name: "Windows 2019 mingw-x64" + os: windows-2019 + build: { shell: msys2 {0} } defaults: run: shell: ${{ matrix.build.shell }} @@ -45,13 +47,13 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - - name: Update apt + - name: Update apt (Ubuntu) if: contains(matrix.os, 'ubuntu') env: DEBIAN_FRONTEND: noninteractive run: sudo -E apt-get update -qq -o Acquire::Retries=3 - - name: Add libheif PPA + - name: Add libheif PPA (Ubuntu) if: contains(matrix.os, 'ubuntu') run: | sudo add-apt-repository ppa:strukturag/libde265 @@ -67,6 +69,14 @@ jobs: libheif-dev libfreetype-dev libheif-dev libavifile-0.7-dev libxpm-dev libraqm-dev + - 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: Install macOS dependencies if: contains(matrix.os, 'macos') run: | @@ -105,6 +115,27 @@ jobs: $Env:VCPKG_DEFAULT_TRIPLET="x64-windows" C:\vcpkg\vcpkg.exe install libpng libjpeg-turbo freetype tiff libheif libwebp + + - name: Setup mingw-64 Windows + if: contains(matrix.name, '2019 mingw-x64') + - uses: msys2/setup-msys2@v2 + run: | + pacman --noconfirm -S make gcc mingw-w64-x86_64-libpng + mingw-w64-x86_64-libjpeg-turbo mingw-w64-x86_64-freetype + mingw-w64-x86_64-libtiff mingw-w64-x86_64-libwebp mingw-w64-x86_64-libheif + mingw-w64-x86_64-libraqm mingw-w64-x86_64-libimagequant mingw-w64-x86_64-libavif + mingw-w64-x86_64-cmake + + - name: Cmake mingw-64 Windows + if: contains(matrix.name, '2019 mingw-x64') + - uses: msys2/setup-msys2@v2 + 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_INCLUDE_PATH=C:/msys64/mingw64/include + -DCMAKE_LIBRARY_PATH=C:/msys64/mingw64/lib -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -B${{github.workspace}}/build + - 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. @@ -114,14 +145,6 @@ jobs: -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 -- cgit v1.2.1 From 3afd4955a406a1a1fb1feb4966c088b13f403538 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Fri, 27 Aug 2021 20:54:24 +0700 Subject: add mingw64 CI, setup and cmake configure, try 2 --- .github/workflows/ci_master.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_master.yml b/.github/workflows/ci_master.yml index 77b3272..253ab3f 100644 --- a/.github/workflows/ci_master.yml +++ b/.github/workflows/ci_master.yml @@ -38,7 +38,8 @@ jobs: build: { shell: powershell } - name: "Windows 2019 mingw-x64" os: windows-2019 - build: { shell: msys2 {0} } + - { sys: mingw64, env: x86_64 } + defaults: run: shell: ${{ matrix.build.shell }} @@ -115,10 +116,12 @@ jobs: $Env:VCPKG_DEFAULT_TRIPLET="x64-windows" C:\vcpkg\vcpkg.exe install libpng libjpeg-turbo freetype tiff libheif libwebp - - name: Setup mingw-64 Windows if: contains(matrix.name, '2019 mingw-x64') - uses: msys2/setup-msys2@v2 + with: + msystem: ${{matrix.sys}} + install: mingw-w64-${{matrix.env}}-toolchain run: | pacman --noconfirm -S make gcc mingw-w64-x86_64-libpng mingw-w64-x86_64-libjpeg-turbo mingw-w64-x86_64-freetype -- cgit v1.2.1 From 2dbc4218e3ca52f894c59b9c01781179fa688ca6 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Fri, 27 Aug 2021 21:10:52 +0700 Subject: try to fix matrix with 2x the same os, try alone with msys2 shell --- .github/workflows/ci_master.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_master.yml b/.github/workflows/ci_master.yml index 253ab3f..6e47a36 100644 --- a/.github/workflows/ci_master.yml +++ b/.github/workflows/ci_master.yml @@ -33,9 +33,9 @@ jobs: # - 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 } +# - name: "Windows 2019 x64" +# os: windows-2019 +# build: { shell: powershell } - name: "Windows 2019 mingw-x64" os: windows-2019 - { sys: mingw64, env: x86_64 } -- cgit v1.2.1 From 858eed7bc9f0e559b3c973cee460a06b933cc43a Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Fri, 27 Aug 2021 22:02:26 +0700 Subject: Let do it from scratch standalone for now --- .github/workflows/ci_master_mingw.yml | 57 +++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/ci_master_mingw.yml diff --git a/.github/workflows/ci_master_mingw.yml b/.github/workflows/ci_master_mingw.yml new file mode 100644 index 0000000..b92c8fa --- /dev/null +++ b/.github/workflows/ci_master_mingw.yml @@ -0,0 +1,57 @@ + name: CI Windows MingW +on: + push: + branches: [ features/mingw-ci ] +BUILD_TYPE: Debug +jobs: + + build: + runs-on: windows-latest + strategy: + matrix: + fail-fast: false + 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} + steps: + + - name: '🧰 Checkout' + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: '${{ matrix.icon }} Setup MSYS2' + with: + msystem: ${{matrix.sys}} + update: true + install: >- + git + make + mingw-w64-${{matrix.env}}-toolchain + mingw-w64-${{matrix.env}}-cmake + mingw-w64-${{matrix.env}}-ninja + 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: | + cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -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_INCLUDE_PATH=C:/msys64/mingw64/include -DCMAKE_LIBRARY_PATH=C:/msys64/mingw64/lib -B ${{github.workspace}}/build + - name: '🚧 CMake Build' + run: | + cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel 4 -- cgit v1.2.1 From 3e1439e5296cd7baf4d8a8aced824684d3063162 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Fri, 27 Aug 2021 22:03:34 +0700 Subject: enable for master instead --- .github/workflows/ci_master_mingw.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_master_mingw.yml b/.github/workflows/ci_master_mingw.yml index b92c8fa..71b3514 100644 --- a/.github/workflows/ci_master_mingw.yml +++ b/.github/workflows/ci_master_mingw.yml @@ -1,7 +1,10 @@ name: CI Windows MingW on: push: - branches: [ features/mingw-ci ] + branches: [ master ] + pull_request: + branches: [ master ] + BUILD_TYPE: Debug jobs: -- cgit v1.2.1 From ab61a9d3c651d3b395277e9f5faeb34910a5511a Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Fri, 27 Aug 2021 22:04:36 +0700 Subject: yaml..... --- .github/workflows/ci_master_mingw.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_master_mingw.yml b/.github/workflows/ci_master_mingw.yml index 71b3514..9d329c9 100644 --- a/.github/workflows/ci_master_mingw.yml +++ b/.github/workflows/ci_master_mingw.yml @@ -1,4 +1,5 @@ - name: CI Windows MingW +name: CI Master + on: push: branches: [ master ] -- cgit v1.2.1 From 89a73009e72cca46df4a2f7b406f8ef7f3c76470 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Fri, 27 Aug 2021 22:09:57 +0700 Subject: yaml..... --- .github/workflows/ci_master_mingw.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci_master_mingw.yml b/.github/workflows/ci_master_mingw.yml index 9d329c9..c5240f2 100644 --- a/.github/workflows/ci_master_mingw.yml +++ b/.github/workflows/ci_master_mingw.yml @@ -50,12 +50,10 @@ jobs: mingw-w64-${{matrix.env}}-libimagequant mingw-w64-${{matrix.env}}-libavif mingw-w64-${{matrix.env}}-cmake + - name: '🚧 CMake Configure' run: | cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -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_INCLUDE_PATH=C:/msys64/mingw64/include -DCMAKE_LIBRARY_PATH=C:/msys64/mingw64/lib -B ${{github.workspace}}/build - - name: '🚧 CMake Build' - run: | - cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel 4 -- cgit v1.2.1 From a4b89f690c3e74bd99e90983b63a54fe68a5b70e Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Fri, 27 Aug 2021 22:11:41 +0700 Subject: yaml..... --- .github/workflows/ci_master_mingw.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_master_mingw.yml b/.github/workflows/ci_master_mingw.yml index c5240f2..adf4887 100644 --- a/.github/workflows/ci_master_mingw.yml +++ b/.github/workflows/ci_master_mingw.yml @@ -19,13 +19,13 @@ jobs: - { 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 }} + name: ${{ matrix.icon }} ${{ matrix.sys }} defaults: run: shell: msys2 {0} steps: - - name: '🧰 Checkout' + - name: Checkout uses: actions/checkout@v2 with: fetch-depth: 0 @@ -51,7 +51,7 @@ jobs: mingw-w64-${{matrix.env}}-libavif mingw-w64-${{matrix.env}}-cmake - - name: '🚧 CMake Configure' + - name: CMake Configure run: | cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_PNG=1 -DENABLE_FREETYPE=1 -DENABLE_XPM=0 -DENABLE_JPEG=1 -DENABLE_WEBP=0 -DENABLE_TIFF=1 -DENABLE_XPM=0 -- cgit v1.2.1 From 5d5e6112bfb4c3509e78de88a8ea864660e82679 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Fri, 27 Aug 2021 22:12:40 +0700 Subject: yaml..... --- .github/workflows/ci_master_mingw.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_master_mingw.yml b/.github/workflows/ci_master_mingw.yml index adf4887..488a134 100644 --- a/.github/workflows/ci_master_mingw.yml +++ b/.github/workflows/ci_master_mingw.yml @@ -30,7 +30,7 @@ jobs: with: fetch-depth: 0 - - name: '${{ matrix.icon }} Setup MSYS2' + - name: ${{ matrix.icon }} Setup MSYS2 with: msystem: ${{matrix.sys}} update: true -- cgit v1.2.1 From 1806f92c33a58ef3c535347d4b03cbf4b4de8943 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Fri, 27 Aug 2021 22:16:25 +0700 Subject: indent --- .github/workflows/ci_master_mingw.yml | 69 ++++++++++++++++++----------------- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/.github/workflows/ci_master_mingw.yml b/.github/workflows/ci_master_mingw.yml index 488a134..5646b05 100644 --- a/.github/workflows/ci_master_mingw.yml +++ b/.github/workflows/ci_master_mingw.yml @@ -7,6 +7,7 @@ on: branches: [ master ] BUILD_TYPE: Debug + jobs: build: @@ -15,45 +16,45 @@ jobs: matrix: fail-fast: false 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! + - { sys: mingw32, env: i686 } + - { sys: mingw64, env: x86_64 } +# - { sys: ucrt64, env: ucrt-x86_64 } # Experimental! +# - { sys: clang64, env: clang-x86_64 } # Experimental! name: ${{ matrix.icon }} ${{ matrix.sys }} defaults: run: shell: msys2 {0} steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 - - name: ${{ matrix.icon }} Setup MSYS2 - with: - msystem: ${{matrix.sys}} - update: true - install: >- - git - make - mingw-w64-${{matrix.env}}-toolchain - mingw-w64-${{matrix.env}}-cmake - mingw-w64-${{matrix.env}}-ninja - 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: Setup MSYS2 + with: + msystem: ${{matrix.sys}} + update: true + install: >- + git + make + mingw-w64-${{matrix.env}}-toolchain + mingw-w64-${{matrix.env}}-cmake + mingw-w64-${{matrix.env}}-ninja + 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: | - cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -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_INCLUDE_PATH=C:/msys64/mingw64/include -DCMAKE_LIBRARY_PATH=C:/msys64/mingw64/lib -B ${{github.workspace}}/build + - name: CMake Configure + run: | + cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -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_INCLUDE_PATH=C:/msys64/mingw64/include -DCMAKE_LIBRARY_PATH=C:/msys64/mingw64/lib -B ${{github.workspace}}/build -- cgit v1.2.1 From 13d45be8e7cee5949d2d040fa5211243590dba0d Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 00:44:11 +0700 Subject: Start from scratch, better matrix, extend later --- .github/workflows/ci_master_mingw.yml | 63 +++++++++++++---------------------- 1 file changed, 23 insertions(+), 40 deletions(-) diff --git a/.github/workflows/ci_master_mingw.yml b/.github/workflows/ci_master_mingw.yml index 5646b05..5f15edc 100644 --- a/.github/workflows/ci_master_mingw.yml +++ b/.github/workflows/ci_master_mingw.yml @@ -1,12 +1,9 @@ -name: CI Master +name: Example CMake on: push: - branches: [ master ] - pull_request: - branches: [ master ] - -BUILD_TYPE: Debug + branches: [ 'features/mingw-ci' ] + workflow_dispatch: jobs: @@ -18,43 +15,29 @@ jobs: include: - { sys: mingw32, env: i686 } - { sys: mingw64, env: x86_64 } -# - { sys: ucrt64, env: ucrt-x86_64 } # Experimental! -# - { sys: clang64, env: clang-x86_64 } # Experimental! - name: ${{ matrix.icon }} ${{ matrix.sys }} + - { sys: clang64, env: clang-x86_64 } # Experimental! + name: ${{ matrix.sys }} defaults: run: shell: msys2 {0} steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Setup MSYS2 - with: - msystem: ${{matrix.sys}} - update: true - install: >- - git - make - mingw-w64-${{matrix.env}}-toolchain - mingw-w64-${{matrix.env}}-cmake - mingw-w64-${{matrix.env}}-ninja - 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: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 - - name: CMake Configure - run: | - cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -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_INCLUDE_PATH=C:/msys64/mingw64/include -DCMAKE_LIBRARY_PATH=C:/msys64/mingw64/lib -B ${{github.workspace}}/build + - name: '${{ matrix.icon }} Setup MSYS2' + with: + msystem: ${{matrix.sys}} + update: true + install: >- + git + make + mingw-w64-${{matrix.env}}-toolchain + mingw-w64-${{matrix.env}}-cmake + mingw-w64-${{matrix.env}}-ninja + - name: Build + run: | + ls -al + pwd \ No newline at end of file -- cgit v1.2.1 From 405f60c8b6b2ba3e35db84eba5f454cb0dffeb14 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 00:49:50 +0700 Subject: Start from scratch, better matrix, extend later --- .github/workflows/ci_master_mingw.yml | 49 +++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci_master_mingw.yml b/.github/workflows/ci_master_mingw.yml index 5f15edc..6f70d44 100644 --- a/.github/workflows/ci_master_mingw.yml +++ b/.github/workflows/ci_master_mingw.yml @@ -1,43 +1,58 @@ -name: Example CMake +name: CI on: push: - branches: [ 'features/mingw-ci' ] + pull_request: + schedule: + - cron: '0 0 * * 3' workflow_dispatch: jobs: - build: + + win-makepkg: runs-on: windows-latest strategy: + fail-fast: false matrix: - fail-fast: false include: - - { sys: mingw32, env: i686 } - - { sys: mingw64, env: x86_64 } - - { sys: clang64, env: clang-x86_64 } # Experimental! - name: ${{ matrix.sys }} + - { 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 }} | makepkg defaults: run: shell: msys2 {0} + env: + MINGW_ARCH: ${{ matrix.sys }} steps: - - name: Checkout + - 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}} + msystem: ${{ matrix.sys }} update: true - install: >- + install: > git - make - mingw-w64-${{matrix.env}}-toolchain - mingw-w64-${{matrix.env}}-cmake - mingw-w64-${{matrix.env}}-ninja - - name: Build + base-devel + tree + mingw-w64-${{ matrix.env }}-toolchain + + - name: '🚧 Install dependencies' run: | + echo "Install dependencies" ls -al - pwd \ No newline at end of file + + - name: '🚧 Build' + run: | + echo "Build" -- cgit v1.2.1 From 25949e90e54db7700a997cba1b83af5be7cf8a09 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 09:35:57 +0700 Subject: verbose-- for the main CI, create new file and run it only for features/mingw-ci branch --- .github/workflows/ci_master.yml | 30 ++---------------------------- .github/workflows/ci_master_mingw.yml | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci_master.yml b/.github/workflows/ci_master.yml index 6e47a36..98c510b 100644 --- a/.github/workflows/ci_master.yml +++ b/.github/workflows/ci_master.yml @@ -33,12 +33,9 @@ jobs: # - 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 } - - name: "Windows 2019 mingw-x64" + - name: "Windows 2019 x64" os: windows-2019 - - { sys: mingw64, env: x86_64 } + build: { shell: powershell } defaults: run: @@ -116,29 +113,6 @@ jobs: $Env:VCPKG_DEFAULT_TRIPLET="x64-windows" C:\vcpkg\vcpkg.exe install libpng libjpeg-turbo freetype tiff libheif libwebp - - name: Setup mingw-64 Windows - if: contains(matrix.name, '2019 mingw-x64') - - uses: msys2/setup-msys2@v2 - with: - msystem: ${{matrix.sys}} - install: mingw-w64-${{matrix.env}}-toolchain - run: | - pacman --noconfirm -S make gcc mingw-w64-x86_64-libpng - mingw-w64-x86_64-libjpeg-turbo mingw-w64-x86_64-freetype - mingw-w64-x86_64-libtiff mingw-w64-x86_64-libwebp mingw-w64-x86_64-libheif - mingw-w64-x86_64-libraqm mingw-w64-x86_64-libimagequant mingw-w64-x86_64-libavif - mingw-w64-x86_64-cmake - - - name: Cmake mingw-64 Windows - if: contains(matrix.name, '2019 mingw-x64') - - uses: msys2/setup-msys2@v2 - 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_INCLUDE_PATH=C:/msys64/mingw64/include - -DCMAKE_LIBRARY_PATH=C:/msys64/mingw64/lib -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -B${{github.workspace}}/build - - 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. diff --git a/.github/workflows/ci_master_mingw.yml b/.github/workflows/ci_master_mingw.yml index 6f70d44..7cf6031 100644 --- a/.github/workflows/ci_master_mingw.yml +++ b/.github/workflows/ci_master_mingw.yml @@ -2,6 +2,8 @@ name: CI on: push: + branches: + - 'features/mingw-ci' pull_request: schedule: - cron: '0 0 * * 3' @@ -10,7 +12,7 @@ on: jobs: - win-makepkg: + win-build: runs-on: windows-latest strategy: fail-fast: false @@ -20,7 +22,7 @@ jobs: - { 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 }} | makepkg + name: 🚧${{ matrix.icon }} ${{ matrix.sys }} | build defaults: run: shell: msys2 {0} @@ -47,6 +49,16 @@ jobs: 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: '🚧 Install dependencies' run: | -- cgit v1.2.1 From ad2b9f24d528ab58ed07ddb14dbc829c4533e7c9 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 09:42:57 +0700 Subject: little debug, tree the msys2 folder --- .github/workflows/ci_master_mingw.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_master_mingw.yml b/.github/workflows/ci_master_mingw.yml index 7cf6031..8d396d1 100644 --- a/.github/workflows/ci_master_mingw.yml +++ b/.github/workflows/ci_master_mingw.yml @@ -63,7 +63,7 @@ jobs: - name: '🚧 Install dependencies' run: | echo "Install dependencies" - ls -al + tree C:/msys2 - name: '🚧 Build' run: | -- cgit v1.2.1 From 1768c42a7a24fafab5bb19e6063f0da4b7dc6dc2 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 09:49:46 +0700 Subject: Cmake Configure (runs on all matrix/config) --- .github/workflows/ci_master_mingw.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_master_mingw.yml b/.github/workflows/ci_master_mingw.yml index 8d396d1..727f2a9 100644 --- a/.github/workflows/ci_master_mingw.yml +++ b/.github/workflows/ci_master_mingw.yml @@ -60,10 +60,13 @@ jobs: mingw-w64-${{ matrix.env }}-libavif mingw-w64-${{ matrix.env }}-cmake - - name: '🚧 Install dependencies' - run: | - echo "Install dependencies" - tree C:/msys2 + - 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_INCLUDE_PATH=C:/msys64/mingw64/include + -DCMAKE_LIBRARY_PATH=C:/msys64/mingw64/lib -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -B${{github.workspace}}/build - name: '🚧 Build' run: | -- cgit v1.2.1 From f9760ed2d42c9c228126ef69ddf1a15b4f044f65 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 09:58:00 +0700 Subject: multi lines cmd error, let see if it was due to indent --- .github/workflows/ci_master_mingw.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci_master_mingw.yml b/.github/workflows/ci_master_mingw.yml index 727f2a9..c621013 100644 --- a/.github/workflows/ci_master_mingw.yml +++ b/.github/workflows/ci_master_mingw.yml @@ -62,11 +62,10 @@ jobs: - 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_INCLUDE_PATH=C:/msys64/mingw64/include - -DCMAKE_LIBRARY_PATH=C:/msys64/mingw64/lib -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -B${{github.workspace}}/build + 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${{github.workspace}}/build - name: '🚧 Build' run: | -- cgit v1.2.1 From 4685fb2a08e9711abd9b31f0418d3dd9d6ac8ed5 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 10:06:25 +0700 Subject: nope, let put it all on 1 line --- .github/workflows/ci_master_mingw.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci_master_mingw.yml b/.github/workflows/ci_master_mingw.yml index c621013..a844258 100644 --- a/.github/workflows/ci_master_mingw.yml +++ b/.github/workflows/ci_master_mingw.yml @@ -22,7 +22,7 @@ jobs: - { 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 }} | build + name: 🚧${{ matrix.icon }} ${{ matrix.sys }} | CI defaults: run: shell: msys2 {0} @@ -62,10 +62,7 @@ jobs: - 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${{github.workspace}}/build + 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${{github.workspace}}/build - name: '🚧 Build' run: | -- cgit v1.2.1 From 46f89bc9500314f56449afad6ab3a395ea4b0f7c Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 10:15:32 +0700 Subject: not so clean, but that container will be killed after anyway --- .github/workflows/ci_master_mingw.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_master_mingw.yml b/.github/workflows/ci_master_mingw.yml index a844258..c286015 100644 --- a/.github/workflows/ci_master_mingw.yml +++ b/.github/workflows/ci_master_mingw.yml @@ -62,7 +62,7 @@ jobs: - 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${{github.workspace}}/build + 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: | -- cgit v1.2.1 From c544604598a3cadd8d74907e5a3013105733e187 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 10:24:27 +0700 Subject: build and run tests --- .github/workflows/ci_master_mingw.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_master_mingw.yml b/.github/workflows/ci_master_mingw.yml index c286015..1827257 100644 --- a/.github/workflows/ci_master_mingw.yml +++ b/.github/workflows/ci_master_mingw.yml @@ -22,7 +22,7 @@ jobs: - { 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 }} | CI + name: 🚧${{ matrix.icon }}-${{ matrix.sys }} defaults: run: shell: msys2 {0} @@ -65,5 +65,12 @@ jobs: 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' + + - name: Build + run: cmake --build . --config ${{env.BUILD_TYPE}} --parallel 4 + + - name: Run tests + working-directory: ${{github.workspace}} run: | - echo "Build" + export CTEST_OUTPUT_ON_FAILURE=1 + ctest -C ${{env.BUILD_TYPE}} -- cgit v1.2.1 From d37950267187d8e84595109f78aec8499095442f Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 10:41:55 +0700 Subject: remove empty step --- .github/workflows/ci_master_mingw.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci_master_mingw.yml b/.github/workflows/ci_master_mingw.yml index 1827257..3677f48 100644 --- a/.github/workflows/ci_master_mingw.yml +++ b/.github/workflows/ci_master_mingw.yml @@ -64,8 +64,6 @@ jobs: 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' - - name: Build run: cmake --build . --config ${{env.BUILD_TYPE}} --parallel 4 -- cgit v1.2.1 From 51426ed2e98870dbbedb40735f5697c4dbb2637c Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 11:12:14 +0700 Subject: set build type, remove scheduled run --- .github/workflows/ci_master_mingw.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_master_mingw.yml b/.github/workflows/ci_master_mingw.yml index 3677f48..7e5b11e 100644 --- a/.github/workflows/ci_master_mingw.yml +++ b/.github/workflows/ci_master_mingw.yml @@ -5,10 +5,13 @@ on: branches: - 'features/mingw-ci' pull_request: - schedule: - - cron: '0 0 * * 3' + workflow_dispatch: +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: RELWITHDEBINFO + jobs: -- cgit v1.2.1 From 0482d7a7e9392eb3cea5d1dab998886f5afdf11b Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 11:39:13 +0700 Subject: MINGW32 or MINGW64 --- tests/gdtest/gdtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/gdtest/gdtest.c b/tests/gdtest/gdtest.c index 33b263e..a902b64 100644 --- a/tests/gdtest/gdtest.c +++ b/tests/gdtest/gdtest.c @@ -27,7 +27,7 @@ #include "readdir.h" #include #endif -#if defined(__MINGW32__) && defined(__MINGW64__) +#if defined(__MINGW32__) || defined(__MINGW64__) # define lstat stat #endif #include "gd_intern.h" -- cgit v1.2.1 From 49f3e0250ce2c984d2ce2583abaca63e6e3e42e9 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 11:51:18 +0700 Subject: we need the TMP or TMPDIR env set and the path must exist --- .github/workflows/ci_master_mingw.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci_master_mingw.yml b/.github/workflows/ci_master_mingw.yml index 7e5b11e..50fc654 100644 --- a/.github/workflows/ci_master_mingw.yml +++ b/.github/workflows/ci_master_mingw.yml @@ -73,5 +73,7 @@ jobs: - 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}} -- cgit v1.2.1 From 6c38955d73e532a6deb40b62a44348dc295f8518 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 12:00:04 +0700 Subject: for the tests, it seems mingw can fail too often to find/create the tmpidr, let default it to ./tmp and fail if it cannot be created/used --- tests/gdtest/gdtest.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/gdtest/gdtest.c b/tests/gdtest/gdtest.c index a902b64..12b3149 100644 --- a/tests/gdtest/gdtest.c +++ b/tests/gdtest/gdtest.c @@ -226,12 +226,6 @@ char* strrstr (char* haystack, char* needle) static char * mkdtemp (char *tmpl) { - static const char letters[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; - static const int NLETTERS = sizeof (letters) - 1; - static int counter = 0; - char *XXXXXX; - struct timeval tv; - __int64 value; int count; size_t l; char attempts = 5; @@ -283,7 +277,12 @@ const char *gdTestTempDir(void) // Mingw defines it tmpdir_root = getenv("TMP"); if (tmpdir_root == NULL) { - tmpdir_root = "/tmp"; + // On MingW it seems we fail too often. Let default to this and create it ourselves + tmpdir_root = "./tmp"; + if (mkdir(tmpdir_root) == 0) { + printf("tmpdir failed to be used or initialized."); + exit(2); + } } } #endif -- cgit v1.2.1 From 33ade122c19b0c86c789782a9747ba045eac4757 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 14:25:40 +0700 Subject: don't use gdTestAssert in these functions, we are not testing them. Proper null return and avoid random segv if environment is not setup correctly --- tests/gdtest/gdtest.c | 96 +++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 78 insertions(+), 18 deletions(-) diff --git a/tests/gdtest/gdtest.c b/tests/gdtest/gdtest.c index 12b3149..66a4d2f 100644 --- a/tests/gdtest/gdtest.c +++ b/tests/gdtest/gdtest.c @@ -80,7 +80,28 @@ gdImagePtr gdTestImageFromPng(const char *filename) } static char *tmpdir_base; +int gdTestIsDir(char *path) { +#if defined(_WIN32) && !defined(__MINGW32__) && !defined(__MINGW64__) + WIN32_FILE_ATTRIBUTE_DATA data; + + if (!GetFileAttributesEx(de->d_name, GetFileExInfoStandard, &data)) { + continue; + } + if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { + _clean_dir(de->d_name); + } else { + unlink(de->d_name); + } + +#else + struct stat st; + if (lstat(path, &st) != 0) + if (S_ISDIR(st.st_mode)) + return 1; + return 0; +#endif +} /* This is kind of hacky, but it's meant to be simple. */ static void _clean_dir(const char *dir) { @@ -193,8 +214,10 @@ static int getfilesystemtime(struct timeval *tv) #if defined(_WIN32) static void randtemplate(char *template, size_t l) { - for (int i = l - 6; i < l; i++) { - int r = rand (); + // just to avoid calls within the same second + srand(time (NULL) + (unsigned int)template); + for (size_t i = l - 6; i < l; i++) { + int r = rand(); if ((r / (RAND_MAX + 1)) > ((RAND_MAX + 1) / 2)) template[i] = 'A' + (double) rand () / (RAND_MAX + 1) * ('Z' - 'A'); else @@ -226,9 +249,8 @@ char* strrstr (char* haystack, char* needle) static char * mkdtemp (char *tmpl) { - int count; size_t l; - char attempts = 5; + char attempts = 8; int res = 0; if (tmpl == NULL) { @@ -241,7 +263,6 @@ mkdtemp (char *tmpl) errno = EINVAL; return NULL; } - srand(time (NULL)); do { randtemplate (tmpl, l); res = mkdir(tmpl); @@ -252,6 +273,7 @@ mkdtemp (char *tmpl) return tmpl; } if (errno != EEXIST) { + printf("Failed to create tmp dir, last attempt %s.", tmpl); return NULL; } @@ -268,8 +290,11 @@ const char *gdTestTempDir(void) #if defined(_WIN32) && !defined(__MINGW32__) && !defined(__MINGW64__) char tmpdir_root[MAXPATHLEN]; size_t tmpdir_root_len = GetTempPath(MAX_PATH, tmpdir_root); - gdTestAssert(!(tmpdir_root_len > MAX_PATH || (tmpdir_root_len == 0))); - gdTestAssert((tmpdir_root_len + 30 < MAX_PATH)); + if (!(tmpdir_root_len > MAX_PATH || (tmpdir_root_len == 0)) + || !(tmpdir_root_len + 30 < MAX_PATH)) { + printf("Tmp dir path too long"); + return NULL; + } #else char *tmpdir_root; tmpdir_root = getenv("TMPDIR"); @@ -280,7 +305,7 @@ const char *gdTestTempDir(void) // On MingW it seems we fail too often. Let default to this and create it ourselves tmpdir_root = "./tmp"; if (mkdir(tmpdir_root) == 0) { - printf("tmpdir failed to be used or initialized."); + printf("tmpdir failed to be used or initialized (%s).", tmpdir_root); exit(2); } } @@ -289,14 +314,24 @@ const char *gdTestTempDir(void) /* The constant here is a lazy over-estimate. */ tmpdir = malloc(strlen(tmpdir_root) + 30); - gdTestAssert(tmpdir != NULL); + if (tmpdir == NULL) { + printf("cannot alloc tmpdir path."); + return NULL; + } + #if defined(_WIN32) sprintf(tmpdir, "%sgdtest.XXXXXX", tmpdir_root); #else sprintf(tmpdir, "%s/gdtest.XXXXXX", tmpdir_root); #endif + if (gdTestIsDir(tmpdir)) { + return tmpdir; + } tmpdir_base = mkdtemp(tmpdir); - gdTestAssert(tmpdir_base != NULL); + if (tmpdir_base == NULL) { + printf("failed to generate the tmp dir path (%s).", tmpdir); + return NULL; + } atexit(tmpdir_cleanup); } @@ -308,20 +343,29 @@ char *gdTestTempFile(const char *template) { const char *tempdir = gdTestTempDir(); char *ret; - + if (tempdir == NULL) { + return NULL; + } #if defined(_WIN32) && !defined(__MINGW32__) && !defined(__MINGW64__) { char *tmpfilename; UINT error; ret = malloc(MAX_PATH); - gdTestAssert(ret != NULL); + if (ret == NULL) { + printf("Failed to alloc tmp path"); + return NULL; + } if (template == NULL) { error = GetTempFileName(tempdir, "gdtest", 0, ret); - gdTestAssert(error != 0); + if (error = 0) { + printf("GetTempFileName failed."); + gdFree(ret); + return NULL; + } } else { sprintf(ret, "%s\\%s", tempdir, template); } @@ -331,12 +375,19 @@ char *gdTestTempFile(const char *template) template = "gdtemp.XXXXXX"; } ret = malloc(strlen(tempdir) + 10 + strlen(template)); - gdTestAssert(ret != NULL); + if (ret == NULL) { + printf("Failed to alloc tmp path"); + return NULL; + } sprintf(ret, "%s/%s", tempdir, template); if (strstr(template, "XXXXXX") != NULL) { int fd = mkstemp(ret); - gdTestAssert(fd != -1); + if (fd == -1) { + printf("mkstemp failed"); + gdFree(ret); + return NULL; + } close(fd); } #endif @@ -347,7 +398,10 @@ FILE *gdTestTempFp(void) { char *file = gdTestTempFile(NULL); FILE *fp = fopen(file, "wb"); - gdTestAssert(fp != NULL); + if (fp == NULL) { + printf("fail to open tmp file"); + return NULL; + } free(file); return fp; } @@ -370,7 +424,10 @@ char *gdTestFilePathV(const char *path, va_list args) /* Now build the path. */ file = malloc(len); - gdTestAssert(file != NULL); + if (file == NULL) { + printf("failed to alloc path."); + return NULL; + } strcpy(file, GDTEST_TOP_DIR); p = path; do { @@ -403,7 +460,10 @@ FILE *gdTestFileOpenX(const char *path, ...) va_start(args, path); file = gdTestFilePathV(path, args); fp = fopen(file, "rb"); - gdTestAssert(fp != NULL); + if (fp == NULL) { + printf("failed to open path (rb)."); + return NULL; + } free(file); return fp; } -- cgit v1.2.1 From d11355b4e7a14d49b5d18c76ec49a5bddd60d6ce Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 15:11:31 +0700 Subject: Skip those on Mingw 32bit, rounding issues only on these enviromnents, won't fix. --- tests/gdimagecopyresampled/bug00201.c | 4 ++++ tests/gdimagegrayscale/basic.c | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/gdimagecopyresampled/bug00201.c b/tests/gdimagecopyresampled/bug00201.c index 0287267..aa3cf73 100644 --- a/tests/gdimagecopyresampled/bug00201.c +++ b/tests/gdimagecopyresampled/bug00201.c @@ -43,6 +43,10 @@ int main() gdImagePtr layers[2], background, logo_source, logo, scaled_logo, img; FILE *fp; +// Rounding issue, won't fix as it only happens on mingw 32bit. +#if defined(__MINGW32__) + return 77; +#endif background = blank_image(DEST_WIDTH,DEST_HEIGHT); fp = gdTestFileOpen2("gdimagecopyresampled", "bug00201_src.png"); diff --git a/tests/gdimagegrayscale/basic.c b/tests/gdimagegrayscale/basic.c index 3ecc482..c8d49ba 100644 --- a/tests/gdimagegrayscale/basic.c +++ b/tests/gdimagegrayscale/basic.c @@ -10,7 +10,10 @@ int main() gdImagePtr im; FILE *fp; char *path; - +// Rounding issue, won't fix as it only happens on mingw 32bit. +#if defined(__MINGW32__) + return 77; +#endif fp = gdTestFileOpen2("gdimagegrayscale", "basic.png"); im = gdImageCreateFromPng(fp); fclose(fp); -- cgit v1.2.1 From a35bed9ac5e9f7837db63ff2a0650c4c3a89701a Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 15:29:51 +0700 Subject: skip clang for now, not stable --- .github/workflows/ci_master_mingw.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_master_mingw.yml b/.github/workflows/ci_master_mingw.yml index 50fc654..0e41b5b 100644 --- a/.github/workflows/ci_master_mingw.yml +++ b/.github/workflows/ci_master_mingw.yml @@ -24,7 +24,7 @@ jobs: - { 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! +# - { icon: '🟧', sys: clang64, env: clang-x86_64 } # Experimental! name: 🚧${{ matrix.icon }}-${{ matrix.sys }} defaults: run: -- cgit v1.2.1 From 87ac6fdd02d0c0af33e452c5819b395bbece160d Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 15:41:42 +0700 Subject: fix linux/macos build --- tests/gdtest/gdtest.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/gdtest/gdtest.c b/tests/gdtest/gdtest.c index 66a4d2f..0548690 100644 --- a/tests/gdtest/gdtest.c +++ b/tests/gdtest/gdtest.c @@ -304,7 +304,11 @@ const char *gdTestTempDir(void) if (tmpdir_root == NULL) { // On MingW it seems we fail too often. Let default to this and create it ourselves tmpdir_root = "./tmp"; +#if defined(__MINGW32__) || defined(__MINGW64__) if (mkdir(tmpdir_root) == 0) { +#else + if (mkdir(tmpdir_root, 0700) == 0) { +#endif printf("tmpdir failed to be used or initialized (%s).", tmpdir_root); exit(2); } -- cgit v1.2.1 From 472930f6e1593392661e2459f1254659d047ba01 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 10:49:05 +0700 Subject: ensure we have TMP defined on Ubuntu --- .github/workflows/ci_master.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_master.yml b/.github/workflows/ci_master.yml index 98c510b..2c21d7c 100644 --- a/.github/workflows/ci_master.yml +++ b/.github/workflows/ci_master.yml @@ -132,6 +132,8 @@ jobs: # Execute tests defined by the CMake configuration. # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: | + mkdir tmp + export TMP=${{github.workspace}}/tmp echo "LSAN_OPTIONS=suppressions=${{ github.workspace }}/suppressions/lsan.supp" >> $GITHUB_ENV CTEST_OUTPUT_ON_FAILURE=1 ctest -C ${{env.BUILD_TYPE}} @@ -148,7 +150,10 @@ jobs: 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 + run: | + mkdir tmp + export TMP=${{github.workspace}}/tmp + 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}} @@ -162,8 +167,10 @@ jobs: 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}} - + run: | + mkdir tmp + export TMP=${{github.workspace}}/tmp + CTEST_OUTPUT_ON_FAILURE=1 ctest -C ${{env.BUILD_TYPE}} - name: Output Log if: contains(matrix.os, 'ubuntu') -- cgit v1.2.1 From 9f597cb6d9ee30ff2b7cd28f0f3b192f94497456 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 10:52:19 +0700 Subject: fix windows build --- tests/gdtest/gdtest.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/gdtest/gdtest.c b/tests/gdtest/gdtest.c index 0548690..92064d9 100644 --- a/tests/gdtest/gdtest.c +++ b/tests/gdtest/gdtest.c @@ -84,15 +84,14 @@ int gdTestIsDir(char *path) { #if defined(_WIN32) && !defined(__MINGW32__) && !defined(__MINGW64__) WIN32_FILE_ATTRIBUTE_DATA data; - if (!GetFileAttributesEx(de->d_name, GetFileExInfoStandard, &data)) { + if (!GetFileAttributesEx(path, GetFileExInfoStandard, &data)) { continue; } if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { - _clean_dir(de->d_name); + return 0; } else { - unlink(de->d_name); + return 1; } - #else struct stat st; if (lstat(path, &st) != 0) -- cgit v1.2.1 From 9e02f643251743d523f1f1c53e02f8cdc97c8191 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 11:11:44 +0700 Subject: fix linux variants mkdstemp --- tests/gdtest/gdtest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/gdtest/gdtest.c b/tests/gdtest/gdtest.c index 92064d9..e2a2582 100644 --- a/tests/gdtest/gdtest.c +++ b/tests/gdtest/gdtest.c @@ -301,12 +301,12 @@ const char *gdTestTempDir(void) // Mingw defines it tmpdir_root = getenv("TMP"); if (tmpdir_root == NULL) { +#if defined(__MINGW32__) || defined(__MINGW64__) // On MingW it seems we fail too often. Let default to this and create it ourselves tmpdir_root = "./tmp"; -#if defined(__MINGW32__) || defined(__MINGW64__) - if (mkdir(tmpdir_root) == 0) { + if (!gdTestIsDir(tmpdir_root) && mkdir(tmpdir_root) == 0) { #else - if (mkdir(tmpdir_root, 0700) == 0) { + if (!gdTestIsDir(tmpdir_root) && mkdir(tmpdir_root, 0700) == 0) { #endif printf("tmpdir failed to be used or initialized (%s).", tmpdir_root); exit(2); -- cgit v1.2.1 From 5c6dcd16480894bb16ec034202f8155f5b54e701 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 11:20:13 +0700 Subject: don't attempt to create it, fall back to /tmp on linux/mingw like --- .github/workflows/ci_master.yml | 7 +------ tests/gdtest/gdtest.c | 10 +++------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci_master.yml b/.github/workflows/ci_master.yml index 2c21d7c..be1eef2 100644 --- a/.github/workflows/ci_master.yml +++ b/.github/workflows/ci_master.yml @@ -132,8 +132,6 @@ jobs: # Execute tests defined by the CMake configuration. # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: | - mkdir tmp - export TMP=${{github.workspace}}/tmp echo "LSAN_OPTIONS=suppressions=${{ github.workspace }}/suppressions/lsan.supp" >> $GITHUB_ENV CTEST_OUTPUT_ON_FAILURE=1 ctest -C ${{env.BUILD_TYPE}} @@ -151,8 +149,6 @@ jobs: # 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: | - mkdir tmp - export TMP=${{github.workspace}}/tmp 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}} @@ -168,13 +164,12 @@ jobs: # Execute tests defined by the CMake configuration. # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: | - mkdir tmp - export TMP=${{github.workspace}}/tmp CTEST_OUTPUT_ON_FAILURE=1 ctest -C ${{env.BUILD_TYPE}} - name: Output Log if: contains(matrix.os, 'ubuntu') run: | + ls /tmp 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/tests/gdtest/gdtest.c b/tests/gdtest/gdtest.c index e2a2582..0ce9da9 100644 --- a/tests/gdtest/gdtest.c +++ b/tests/gdtest/gdtest.c @@ -301,13 +301,9 @@ const char *gdTestTempDir(void) // Mingw defines it tmpdir_root = getenv("TMP"); if (tmpdir_root == NULL) { -#if defined(__MINGW32__) || defined(__MINGW64__) - // On MingW it seems we fail too often. Let default to this and create it ourselves - tmpdir_root = "./tmp"; - if (!gdTestIsDir(tmpdir_root) && mkdir(tmpdir_root) == 0) { -#else - if (!gdTestIsDir(tmpdir_root) && mkdir(tmpdir_root, 0700) == 0) { -#endif + // Fall back here. + tmpdir_root = "/tmp"; + if (!gdTestIsDir(tmpdir_root)) { printf("tmpdir failed to be used or initialized (%s).", tmpdir_root); exit(2); } -- cgit v1.2.1 From 3c012078359ff9b959306040c3e6e4e5d8cbd26e Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 11:34:36 +0700 Subject: tmp dir on Ubuntu --- .github/workflows/ci_master.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_master.yml b/.github/workflows/ci_master.yml index be1eef2..ac2f2bf 100644 --- a/.github/workflows/ci_master.yml +++ b/.github/workflows/ci_master.yml @@ -71,9 +71,13 @@ jobs: 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}} + run: | + mkdir -p =${{github.workspace}}/tmptmp + export TMP=${{github.workspace}}/tmp + echo "TMP=${{github.workspace}}/tmp" >> $GITHUB_ENV + 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: Install macOS dependencies if: contains(matrix.os, 'macos') @@ -132,6 +136,12 @@ jobs: # Execute tests defined by the CMake configuration. # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: | + ls -al / + ls -al /tmp + export + mkdir -p =${{github.workspace}}/tmp + export TMP=${{github.workspace}}/tmp + echo "TMP=${{github.workspace}}/tmp" >> $GITHUB_ENV echo "LSAN_OPTIONS=suppressions=${{ github.workspace }}/suppressions/lsan.supp" >> $GITHUB_ENV CTEST_OUTPUT_ON_FAILURE=1 ctest -C ${{env.BUILD_TYPE}} @@ -164,12 +174,14 @@ jobs: # Execute tests defined by the CMake configuration. # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: | + mkdir -p =${{github.workspace}}/tmptmp + export TMP=${{github.workspace}}/tmp + echo "TMP=${{github.workspace}}/tmp" >> $GITHUB_ENV CTEST_OUTPUT_ON_FAILURE=1 ctest -C ${{env.BUILD_TYPE}} - name: Output Log if: contains(matrix.os, 'ubuntu') run: | - ls /tmp 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 -- cgit v1.2.1 From 60ac1286ee1ba96448802239b78c1f7e123a2792 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 11:34:54 +0700 Subject: windows logic --- tests/gdtest/gdtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/gdtest/gdtest.c b/tests/gdtest/gdtest.c index 0ce9da9..4fa8f24 100644 --- a/tests/gdtest/gdtest.c +++ b/tests/gdtest/gdtest.c @@ -85,7 +85,7 @@ int gdTestIsDir(char *path) { WIN32_FILE_ATTRIBUTE_DATA data; if (!GetFileAttributesEx(path, GetFileExInfoStandard, &data)) { - continue; + return 0; } if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { return 0; -- cgit v1.2.1 From 315624f4250f77c6e10d73c646cf11a5c5fe1ab7 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 11:37:44 +0700 Subject: tmp dir on Ubuntu --- .github/workflows/ci_master.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/ci_master.yml b/.github/workflows/ci_master.yml index ac2f2bf..0174a5c 100644 --- a/.github/workflows/ci_master.yml +++ b/.github/workflows/ci_master.yml @@ -71,10 +71,7 @@ jobs: 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: | - mkdir -p =${{github.workspace}}/tmptmp - export TMP=${{github.workspace}}/tmp - echo "TMP=${{github.workspace}}/tmp" >> $GITHUB_ENV + 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}} -- cgit v1.2.1 From 10cd1fdf82a658932bb29f4ba89ab71ba66e93d6 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 11:46:59 +0700 Subject: too early return --- tests/gdtest/gdtest.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/gdtest/gdtest.c b/tests/gdtest/gdtest.c index 4fa8f24..8e9d56c 100644 --- a/tests/gdtest/gdtest.c +++ b/tests/gdtest/gdtest.c @@ -323,9 +323,7 @@ const char *gdTestTempDir(void) #else sprintf(tmpdir, "%s/gdtest.XXXXXX", tmpdir_root); #endif - if (gdTestIsDir(tmpdir)) { - return tmpdir; - } + tmpdir_base = mkdtemp(tmpdir); if (tmpdir_base == NULL) { printf("failed to generate the tmp dir path (%s).", tmpdir); -- cgit v1.2.1 From a3e1f6723155d5af7800a8750bde9292a0bee306 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 12:12:07 +0700 Subject: missedd that one, should work --- .github/workflows/ci_master.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci_master.yml b/.github/workflows/ci_master.yml index 0174a5c..3954952 100644 --- a/.github/workflows/ci_master.yml +++ b/.github/workflows/ci_master.yml @@ -133,12 +133,8 @@ jobs: # Execute tests defined by the CMake configuration. # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: | - ls -al / - ls -al /tmp - export - mkdir -p =${{github.workspace}}/tmp - export TMP=${{github.workspace}}/tmp - echo "TMP=${{github.workspace}}/tmp" >> $GITHUB_ENV + 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}} @@ -148,6 +144,7 @@ jobs: # Execute tests defined by the CMake configuration. # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: | + $Env:TMP=${{github.temp}} $Env:CTEST_OUTPUT_ON_FAILURE=1 ctest -C ${{env.BUILD_TYPE}} @@ -171,9 +168,8 @@ jobs: # Execute tests defined by the CMake configuration. # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: | - mkdir -p =${{github.workspace}}/tmptmp - export TMP=${{github.workspace}}/tmp - echo "TMP=${{github.workspace}}/tmp" >> $GITHUB_ENV + export TMP=${{runner.temp}} + echo "TMP=${{github.temp}}" >> $GITHUB_ENV CTEST_OUTPUT_ON_FAILURE=1 ctest -C ${{env.BUILD_TYPE}} - name: Output Log -- cgit v1.2.1 From 9ef4c7b10c50e305fb175f00d73023c2e6e472c0 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 12:20:52 +0700 Subject: single line cmd --- .github/workflows/ci_master.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_master.yml b/.github/workflows/ci_master.yml index 3954952..eb26860 100644 --- a/.github/workflows/ci_master.yml +++ b/.github/workflows/ci_master.yml @@ -152,7 +152,7 @@ jobs: 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: | + 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}} -- cgit v1.2.1 From 7c835010233bb45d114a7a2d0839d95b6f8629bb Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 13:29:49 +0700 Subject: first attempt to add cross runs cache for deps --- .github/workflows/ci_master.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci_master.yml b/.github/workflows/ci_master.yml index eb26860..2e8a113 100644 --- a/.github/workflows/ci_master.yml +++ b/.github/workflows/ci_master.yml @@ -108,6 +108,14 @@ jobs: -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}} + - uses: actions/cache@v2 + with: + path: C:\vcpkg\downloads + key: ${{ runner.os }}-vcpkg-download-${{ matrix.os }}-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-vcpkg-download-${{ matrix.os }}- + ${{ runner.os }}-vcpkg-download- + - name: Install Dependencies Windows if: contains(matrix.os, 'Windows') run: | -- cgit v1.2.1 From b027748da2a0059ad23c5e18429a64df3532532a Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 14:16:06 +0700 Subject: test using RELWITHDEBINFO --- .github/workflows/ci_master.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_master.yml b/.github/workflows/ci_master.yml index 2e8a113..a5947d6 100644 --- a/.github/workflows/ci_master.yml +++ b/.github/workflows/ci_master.yml @@ -8,7 +8,7 @@ on: env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) - BUILD_TYPE: Debug + BUILD_TYPE: RELWITHDEBINFO jobs: CI: -- cgit v1.2.1 From 747447f5e6aa83adb4318b50049de1ebf9b9aa7d Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 17:38:41 +0700 Subject: Action for Windows Only --- .github/workflows/ci_windows.yml | 66 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .github/workflows/ci_windows.yml diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml new file mode 100644 index 0000000..217752d --- /dev/null +++ b/.github/workflows/ci_windows.yml @@ -0,0 +1,66 @@ +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 + +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: powershell + env: + MINGW_ARCH: ${{ matrix.sys }} + + steps: + - name: Checkout code + uses: actions/checkout@v2 + - uses: ilammy/msvc-dev-cmd@v1 + with: + arch: ${{ matrix.arch }} + + - name: Install Dependencies + + run: | + $Env:VCPKG_DEFAULT_TRIPLET="x64-windows" + wget https://github.com/libgd/libgd-windows-vcpkg-prebuild/raw/main/x64-windows.7z + 7z x64-windows.7z ${{github.workspace}}\vcpkgusr + + - name: Configure CMake + 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: nmake + + - name: Tests + 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:TMP=${{github.temp}} + $Env:CTEST_OUTPUT_ON_FAILURE=1 + nmake test -- cgit v1.2.1 From 0bf78292f70c4bd4e171612420cc497fc4e79ba7 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 17:39:48 +0700 Subject: remove duplicate entry --- .github/workflows/ci_windows.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index 217752d..d8021a8 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -12,10 +12,6 @@ env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) BUILD_TYPE: RELWITHDEBINFO -env: - # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) - BUILD_TYPE: RELWITHDEBINFO - jobs: CI: runs-on: windows-latest -- cgit v1.2.1 From 54c5d529e847cb0b2301ca102b824e344e07fc3b Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 17:43:14 +0700 Subject: correctly call 7zip --- .github/workflows/ci_windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index d8021a8..ac7ac95 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -40,7 +40,7 @@ jobs: run: | $Env:VCPKG_DEFAULT_TRIPLET="x64-windows" wget https://github.com/libgd/libgd-windows-vcpkg-prebuild/raw/main/x64-windows.7z - 7z x64-windows.7z ${{github.workspace}}\vcpkgusr + 7z.exe x x64-windows.7z -o${{github.workspace}}\vcpkgusr - name: Configure CMake run: cmake -D CMAKE_GENERATOR="NMake Makefiles" -DENABLE_PNG=1 -DENABLE_FREETYPE=1 -DENABLE_JPEG=1 -DENABLE_GD_FORMATS=1 -DENABLE_TIFF=1 -- cgit v1.2.1 From d3ed0fc9c71470f98b21f8108b0e6366a6ed41b9 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 17:49:20 +0700 Subject: use curl, make URL and file use arch --- .github/workflows/ci_windows.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index ac7ac95..e98bacb 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -38,9 +38,8 @@ jobs: - name: Install Dependencies run: | - $Env:VCPKG_DEFAULT_TRIPLET="x64-windows" - wget https://github.com/libgd/libgd-windows-vcpkg-prebuild/raw/main/x64-windows.7z - 7z.exe x x64-windows.7z -o${{github.workspace}}\vcpkgusr + curl -o ${{ matrix.arch }}-windows.7z https://github.com/libgd/libgd-windows-vcpkg-prebuild/raw/main/${{ matrix.arch }}-windows.7z + 7z.exe x ${{ matrix.arch }}-windows.7z -o${{github.workspace}}\vcpkgusr - name: Configure CMake run: cmake -D CMAKE_GENERATOR="NMake Makefiles" -DENABLE_PNG=1 -DENABLE_FREETYPE=1 -DENABLE_JPEG=1 -DENABLE_GD_FORMATS=1 -DENABLE_TIFF=1 -- cgit v1.2.1 From e934299f45e685f131e25de648867121d8fa0bca Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 17:52:39 +0700 Subject: go to the build dir --- .github/workflows/ci_windows.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index e98bacb..8ecb3f3 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -49,13 +49,16 @@ jobs: -DCMAKE_INCLUDE_PATH=${{github.workspace}}\vcpkgusr\${{ matrix.arch }}-windows\include - name: Build - run: nmake + run: | + cd ${{github.workspace}}/build + nmake - name: Tests 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: | + cd ${{github.workspace}}/build $Env:TMP=${{github.temp}} $Env:CTEST_OUTPUT_ON_FAILURE=1 nmake test -- cgit v1.2.1 From 319ff4fd80e17eeb97e14f8357e1ffbd23cf3cee Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 17:57:57 +0700 Subject: add -windows\bin to path to run the tests --- .github/workflows/ci_windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index 8ecb3f3..60b686e 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -58,7 +58,7 @@ jobs: # Execute tests defined by the CMake configuration. # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: | - cd ${{github.workspace}}/build + $Env:PATH=${{github.workspace}}\vcpkgusr\${{ matrix.arch }}-windows\bin;$ENV:PATH $Env:TMP=${{github.temp}} $Env:CTEST_OUTPUT_ON_FAILURE=1 nmake test -- cgit v1.2.1 From d9b2192f848238b2e0491c730126f741b159290e Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 18:04:00 +0700 Subject: paths must be double quoted --- .github/workflows/ci_windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index 60b686e..df50a83 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -58,7 +58,7 @@ jobs: # Execute tests defined by the CMake configuration. # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: | - $Env:PATH=${{github.workspace}}\vcpkgusr\${{ matrix.arch }}-windows\bin;$ENV:PATH + $Env:PATH="${{github.workspace}}\vcpkgusr\${{ matrix.arch }}-windows\bin;$ENV:PATH" $Env:TMP=${{github.temp}} $Env:CTEST_OUTPUT_ON_FAILURE=1 nmake test -- cgit v1.2.1 From 22e6d97b0eb5e83f5c1bbac8d0dfc91fbf3c61c9 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 18:09:27 +0700 Subject: runner.temp not github.temo --- .github/workflows/ci_windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index df50a83..f869d81 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -59,6 +59,6 @@ jobs: # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: | $Env:PATH="${{github.workspace}}\vcpkgusr\${{ matrix.arch }}-windows\bin;$ENV:PATH" - $Env:TMP=${{github.temp}} + $Env:TMP=${{runner.temp}} $Env:CTEST_OUTPUT_ON_FAILURE=1 nmake test -- cgit v1.2.1 From 3ee106e35266fbbbd52e850666a6ba87e569d46c Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 18:14:04 +0700 Subject: yes, paths must double quoted.. --- .github/workflows/ci_windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index f869d81..c2d0d90 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -59,6 +59,6 @@ jobs: # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: | $Env:PATH="${{github.workspace}}\vcpkgusr\${{ matrix.arch }}-windows\bin;$ENV:PATH" - $Env:TMP=${{runner.temp}} + $Env:TMP="${{runner.temp}}" $Env:CTEST_OUTPUT_ON_FAILURE=1 nmake test -- cgit v1.2.1 From 56969147fd5a1984bcda51b6035aa9e2da7bea65 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 18:41:30 +0700 Subject: attempt to fix temp dir --- .github/workflows/ci_windows.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index c2d0d90..105df08 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -55,10 +55,9 @@ jobs: - name: Tests 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:PATH="${{github.workspace}}\vcpkgusr\${{ matrix.arch }}-windows\bin;$ENV:PATH" - $Env:TMP="${{runner.temp}}" + $Env:TMP=$Env:TMPUSERPROFILE%\AppData\Local\Temp + $Env:TEMP=$Env:TMPUSERPROFILE%\AppData\Local\Temp $Env:CTEST_OUTPUT_ON_FAILURE=1 nmake test -- cgit v1.2.1 From 2eee86c8318fb3cbedb2fab7a8568bd8dd2c4e70 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 18:46:49 +0700 Subject: yes, paths must double quoted.. --- .github/workflows/ci_windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index 105df08..645f867 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -57,7 +57,7 @@ jobs: working-directory: ${{github.workspace}}/build run: | - $Env:TMP=$Env:TMPUSERPROFILE%\AppData\Local\Temp - $Env:TEMP=$Env:TMPUSERPROFILE%\AppData\Local\Temp + $Env:TMP="$Env:TMPUSERPROFILE%\AppData\Local\Temp" + $Env:TEMP="$Env:TMPUSERPROFILE%\AppData\Local\Temp" $Env:CTEST_OUTPUT_ON_FAILURE=1 nmake test -- cgit v1.2.1 From d1968105d974fc66dcaf09b3b569d22082967f56 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 18:54:20 +0700 Subject: let debug that tmp... --- .github/workflows/ci_windows.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index 645f867..3dc4e76 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -29,6 +29,16 @@ jobs: MINGW_ARCH: ${{ matrix.sys }} steps: + - name: Check Tmp + working-directory: ${{github.workspace}}/build + + run: | + mkdir ${{github.workspace}}\tmp + $Env:TMP="${{github.workspace}}\tmp" + $Env:TEMP="${{github.workspace}}\tmp" + echo FOO >> "$Env:TMP\t.txt" + dir $Env:TMP\t.txt + - name: Checkout code uses: actions/checkout@v2 - uses: ilammy/msvc-dev-cmd@v1 -- cgit v1.2.1 From a995486341a364a7ded7a26f25345716ac25cc9a Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 18:56:20 +0700 Subject: let debug that tmp... --- .github/workflows/ci_windows.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index 3dc4e76..0348639 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -36,8 +36,7 @@ jobs: mkdir ${{github.workspace}}\tmp $Env:TMP="${{github.workspace}}\tmp" $Env:TEMP="${{github.workspace}}\tmp" - echo FOO >> "$Env:TMP\t.txt" - dir $Env:TMP\t.txt + [System.IO.Path]::GetTempPath() - name: Checkout code uses: actions/checkout@v2 -- cgit v1.2.1 From ee4ee19d530bf9af1c5ab36551d854c6284d0cd8 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 18:57:56 +0700 Subject: let debug that tmp... --- .github/workflows/ci_windows.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index 0348639..c6e3ec2 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -33,7 +33,6 @@ jobs: working-directory: ${{github.workspace}}/build run: | - mkdir ${{github.workspace}}\tmp $Env:TMP="${{github.workspace}}\tmp" $Env:TEMP="${{github.workspace}}\tmp" [System.IO.Path]::GetTempPath() -- cgit v1.2.1 From 272492b332b4eec8bcfe4c339d8bc13ae356aba7 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 19:05:43 +0700 Subject: let debug that tmp... --- .github/workflows/ci_windows.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index c6e3ec2..0d83859 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -33,10 +33,9 @@ jobs: working-directory: ${{github.workspace}}/build run: | - $Env:TMP="${{github.workspace}}\tmp" - $Env:TEMP="${{github.workspace}}\tmp" [System.IO.Path]::GetTempPath() - + $Env:TMP=[System.IO.Path]::GetTempPath() + $Env:TEMP=[System.IO.Path]::GetTempPath() - name: Checkout code uses: actions/checkout@v2 - uses: ilammy/msvc-dev-cmd@v1 -- cgit v1.2.1 From 2079ca067ac1cef6f0a8a0882ab80f81f52e4258 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 19:10:55 +0700 Subject: switch shell to cmd --- .github/workflows/ci_windows.yml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index 0d83859..f8d30d8 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -24,7 +24,7 @@ jobs: name: ${{ matrix.arch }} defaults: run: - shell: powershell + shell: cmd env: MINGW_ARCH: ${{ matrix.sys }} @@ -33,9 +33,14 @@ jobs: working-directory: ${{github.workspace}}/build run: | - [System.IO.Path]::GetTempPath() - $Env:TMP=[System.IO.Path]::GetTempPath() - $Env:TEMP=[System.IO.Path]::GetTempPath() + echo %TMP% + echo %TEMP% + echo ${{runner.temp}} + set TMP=%TMPUSERPROFILE%\AppData\Local\Temp + set TEMP=%TMPUSERPROFILE%\AppData\Local\Temp + echo %TMP% + echo %TEMP% + - name: Checkout code uses: actions/checkout@v2 - uses: ilammy/msvc-dev-cmd@v1 @@ -64,7 +69,10 @@ jobs: working-directory: ${{github.workspace}}/build run: | - $Env:TMP="$Env:TMPUSERPROFILE%\AppData\Local\Temp" - $Env:TEMP="$Env:TMPUSERPROFILE%\AppData\Local\Temp" - $Env:CTEST_OUTPUT_ON_FAILURE=1 + echo ${{runner.temp}} + set TMP=%TMPUSERPROFILE%\AppData\Local\Temp + set TEMP=%TMPUSERPROFILE%\AppData\Local\Temp + echo %TMP% + echo %TEMP% + set CTEST_OUTPUT_ON_FAILURE=1 nmake test -- cgit v1.2.1 From 3586d8e3bb00df80c8c4cc5eeabaa08508c41bad Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 19:12:35 +0700 Subject: build does not exist yet --- .github/workflows/ci_windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index f8d30d8..78c7b36 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -30,7 +30,7 @@ jobs: steps: - name: Check Tmp - working-directory: ${{github.workspace}}/build + working-directory: ${{github.workspace}} run: | echo %TMP% -- cgit v1.2.1 From 62994cfa93c0b9fad98a75222b8ed8635c7c5202 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 19:19:54 +0700 Subject: use final url --- .github/workflows/ci_windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index 78c7b36..444f1bf 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -50,7 +50,7 @@ jobs: - name: Install Dependencies run: | - curl -o ${{ matrix.arch }}-windows.7z https://github.com/libgd/libgd-windows-vcpkg-prebuild/raw/main/${{ matrix.arch }}-windows.7z + 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 -- cgit v1.2.1 From 2a786791bf463513264d17c72ca6d879fdb50085 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 19:24:24 +0700 Subject: let debug that tmp... --- .github/workflows/ci_windows.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index 444f1bf..7df6f12 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -26,7 +26,8 @@ jobs: run: shell: cmd env: - MINGW_ARCH: ${{ matrix.sys }} + TMP: ${{runner.temp}} + TEMP: ${{runner.temp}} steps: - name: Check Tmp @@ -35,11 +36,6 @@ jobs: run: | echo %TMP% echo %TEMP% - echo ${{runner.temp}} - set TMP=%TMPUSERPROFILE%\AppData\Local\Temp - set TEMP=%TMPUSERPROFILE%\AppData\Local\Temp - echo %TMP% - echo %TEMP% - name: Checkout code uses: actions/checkout@v2 @@ -70,8 +66,6 @@ jobs: run: | echo ${{runner.temp}} - set TMP=%TMPUSERPROFILE%\AppData\Local\Temp - set TEMP=%TMPUSERPROFILE%\AppData\Local\Temp echo %TMP% echo %TEMP% set CTEST_OUTPUT_ON_FAILURE=1 -- cgit v1.2.1 From 063d0c06c98bdeef743d64ee7b4d4fce73f59d87 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 19:25:51 +0700 Subject: let debug that tmp... --- .github/workflows/ci_windows.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index 7df6f12..76d105d 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -25,9 +25,6 @@ jobs: defaults: run: shell: cmd - env: - TMP: ${{runner.temp}} - TEMP: ${{runner.temp}} steps: - name: Check Tmp @@ -66,6 +63,8 @@ jobs: run: | echo ${{runner.temp}} + set TMP=${{runner.temp}} + set TEMP=${{runner.temp}} echo %TMP% echo %TEMP% set CTEST_OUTPUT_ON_FAILURE=1 -- cgit v1.2.1 From a327e6961c4dfcfa2ba41a50f6b62dc018f1f23c Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 19:30:24 +0700 Subject: put back the path to vcpkg bin --- .github/workflows/ci_windows.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index 76d105d..fad2093 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -67,5 +67,6 @@ jobs: set TEMP=${{runner.temp}} echo %TMP% echo %TEMP% + set PATH=${{github.workspace}}\vcpkgusr\${{ matrix.arch }}-windows\bin;%PATH% set CTEST_OUTPUT_ON_FAILURE=1 nmake test -- cgit v1.2.1 From fdb1632d9c55648aef5541cce7683c42c1a87b77 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 19:38:44 +0700 Subject: let try not to set TMP and TEMP, works for master/ci windows target --- .github/workflows/ci_windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index fad2093..e8f5149 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -63,8 +63,8 @@ jobs: run: | echo ${{runner.temp}} - set TMP=${{runner.temp}} - set TEMP=${{runner.temp}} +# set TMP=${{runner.temp}} +# set TEMP=${{runner.temp}} echo %TMP% echo %TEMP% set PATH=${{github.workspace}}\vcpkgusr\${{ matrix.arch }}-windows\bin;%PATH% -- cgit v1.2.1 From 7d5628c4d2769780d84a109b54b9fed4d75b1479 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 19:40:09 +0700 Subject: let try not to set TMP and TEMP, works for master/ci windows target --- .github/workflows/ci_windows.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index e8f5149..2786788 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -63,8 +63,6 @@ jobs: run: | echo ${{runner.temp}} -# set TMP=${{runner.temp}} -# set TEMP=${{runner.temp}} echo %TMP% echo %TEMP% set PATH=${{github.workspace}}\vcpkgusr\${{ matrix.arch }}-windows\bin;%PATH% -- cgit v1.2.1 From 9daba6a306205f30502d42fad02a33b89bc3f552 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 19:50:14 +0700 Subject: let debug this on CI --- tests/png/bug00338.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/png/bug00338.c b/tests/png/bug00338.c index f439d8c..cf58674 100644 --- a/tests/png/bug00338.c +++ b/tests/png/bug00338.c @@ -34,6 +34,10 @@ int main() im = gdImageCreateTrueColor(10, 10); fp = gdTestTempFp(); + gdTestAssert(f[]); + if (!fp) { + exit(2); + } gdImagePngEx(im, fp, 100); gdImageDestroy(im); fclose(fp); -- cgit v1.2.1 From 228eee9af6228c58bc33347935a507d3f8b0cbfe Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 01:09:58 +0700 Subject: restore logic --- tests/gdtest/gdtest.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/gdtest/gdtest.c b/tests/gdtest/gdtest.c index 8e9d56c..4150238 100644 --- a/tests/gdtest/gdtest.c +++ b/tests/gdtest/gdtest.c @@ -289,9 +289,8 @@ const char *gdTestTempDir(void) #if defined(_WIN32) && !defined(__MINGW32__) && !defined(__MINGW64__) char tmpdir_root[MAXPATHLEN]; size_t tmpdir_root_len = GetTempPath(MAX_PATH, tmpdir_root); - if (!(tmpdir_root_len > MAX_PATH || (tmpdir_root_len == 0)) - || !(tmpdir_root_len + 30 < MAX_PATH)) { - printf("Tmp dir path too long"); + if ((tmpdir_root_len + 30 > MAX_PATH) || (tmpdir_root_len == 0)) { + printf("Tmp dir path too long or 0 length <%s>\n", tmpdir_root); return NULL; } #else -- cgit v1.2.1 From 4b2b3cb9610d3ea881d7e6f54446d6ad2ed3d70d Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 01:24:13 +0700 Subject: typo --- tests/png/bug00338.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/png/bug00338.c b/tests/png/bug00338.c index cf58674..779180f 100644 --- a/tests/png/bug00338.c +++ b/tests/png/bug00338.c @@ -34,7 +34,7 @@ int main() im = gdImageCreateTrueColor(10, 10); fp = gdTestTempFp(); - gdTestAssert(f[]); + gdTestAssert(fp); if (!fp) { exit(2); } -- cgit v1.2.1 From b561476a1fc05d3f27f97628ceeca9db6fcb2dd4 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 28 Aug 2021 20:36:46 +0700 Subject: enable x86, remove debug code --- .github/workflows/ci_windows.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index 2786788..a4e807f 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -19,21 +19,14 @@ jobs: matrix: arch: - x64 - # - x86 - # - amd64_arm64 + - x86 + #- amd64_arm64 name: ${{ matrix.arch }} defaults: run: shell: cmd steps: - - name: Check Tmp - working-directory: ${{github.workspace}} - - run: | - echo %TMP% - echo %TEMP% - - name: Checkout code uses: actions/checkout@v2 - uses: ilammy/msvc-dev-cmd@v1 -- cgit v1.2.1 From 375b5b47227380bbe34a432877903bd5f6f2a580 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 04:34:05 +0700 Subject: enable amd64_arm64 cross build, tests disabled --- .github/workflows/ci_windows.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index a4e807f..1bffc75 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -20,7 +20,7 @@ jobs: arch: - x64 - x86 - #- amd64_arm64 + - amd64_arm64 name: ${{ matrix.arch }} defaults: run: @@ -53,7 +53,8 @@ jobs: - name: Tests working-directory: ${{github.workspace}}/build - + # skip test for cross builds + if: matrix.arch != 'amd64_arm64' run: | echo ${{runner.temp}} echo %TMP% -- cgit v1.2.1 From 68bbe3da3140a9eff322b07cfa29a556f7a05ecc Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 05:27:36 +0700 Subject: add arm64, disable heif due to libde265 failing on arm64 --- .github/workflows/ci_windows.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index 1bffc75..53772a6 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -34,16 +34,24 @@ jobs: 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 + 7z.exe x ${{ matrix.arch }}-windows.7z -o${{github.workspace}}\vcpkgusr + + - name: Configure CMake + # vcpkg libde265 fails on arm64 + 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\${{ matrix.arch }}-windows\lib + -DCMAKE_INCLUDE_PATH=${{github.workspace}}\vcpkgusr\${{ matrix.arch }}-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_LIBRARY_PATH=${{github.workspace}}\vcpkgusr\${{ matrix.arch }}-windows\lib -DCMAKE_INCLUDE_PATH=${{github.workspace}}\vcpkgusr\${{ matrix.arch }}-windows\include - name: Build -- cgit v1.2.1 From fc8590f8a36db980664f7fff82929bfe78d1784a Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 05:33:18 +0700 Subject: !=amd64_arm64 for normal builds --- .github/workflows/ci_windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index 53772a6..5c1d835 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -47,7 +47,7 @@ jobs: -DCMAKE_INCLUDE_PATH=${{github.workspace}}\vcpkgusr\${{ matrix.arch }}-windows\include - name: Configure CMake - if: matrix.arch == 'amd64_arm64' + 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}} -- cgit v1.2.1 From 98451864ceaae594a38b2fb316fc681ae4b88fa0 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 05:55:52 +0700 Subject: fix build for arm64, also use generic intrin.h instead of the x86 series specific --- src/gd_interpolation.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gd_interpolation.c b/src/gd_interpolation.c index d568090..aa96244 100644 --- a/src/gd_interpolation.c +++ b/src/gd_interpolation.c @@ -72,9 +72,9 @@ TODO: #include "gdhelpers.h" #include "gd_intern.h" -#ifdef _MSC_VER +#ifdef define(_MSC_VER) # pragma optimize("t", on) -# include +# include #endif static gdImagePtr gdImageScaleBilinear(gdImagePtr im, -- cgit v1.2.1 From f4d55671b1ec2210e8a5e63a4f6fbbef50432f16 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 06:06:25 +0700 Subject: match prefix in vcpkg --- .github/workflows/ci_windows.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index 5c1d835..725bc0b 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -39,17 +39,18 @@ jobs: 7z.exe x ${{ matrix.arch }}-windows.7z -o${{github.workspace}}\vcpkgusr - name: Configure CMake - # vcpkg libde265 fails on arm64 + # 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\${{ matrix.arch }}-windows\lib - -DCMAKE_INCLUDE_PATH=${{github.workspace}}\vcpkgusr\${{ matrix.arch }}-windows\include + 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 + 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 -- cgit v1.2.1 From 978998a9713b161e7082f3e4dadf47f88fb67a11 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 14:24:29 +0700 Subject: Ubuntu CI --- .github/workflows/ci_ubuntu.yml | 119 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 .github/workflows/ci_ubuntu.yml diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml new file mode 100644 index 0000000..f11099f --- /dev/null +++ b/.github/workflows/ci_ubuntu.yml @@ -0,0 +1,119 @@ +name: CI Master + +on: + push: + - 'features/mingw-ci' + pull_request: + + +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: [ ubuntu-20.04 ] + sanitize: [ false ] + build: + - { shell: bash } + include: + - name: "Ubuntu 20.04" + os: ubuntu-20.04 + cc: "clang", + cxx: "clang++", + build: { shell: bash } + include: + - name: "Ubuntu 20.04" + os: ubuntu-20.04 + cc: "gcc", + cxx: "g++", + build: { shell: bash } + + defaults: + run: + shell: ${{ matrix.build.shell }} + + 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 Ubuntu dependencies + 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: Configure CMake + env: + CC: ${{ matrix.cc }} + CXX: ${{ matrix.cxx }}) + 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.cc }} + CXX: ${{ matrix.cxx }}) + # Build your program with the given configuration + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel 4 + + - name: Test Ubuntu + 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 Ubuntu + env: + CC: ${{ matrix.cc }} + CXX: ${{ matrix.cxx }}) + 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 Ubuntu + env: + CC: ${{ matrix.cc }} + CXX: ${{ matrix.cxx }}) + run: cmake --build ${{github.workspace}}/buildasan --config ${{env.BUILD_TYPE}} + + - name: Test ASAN Ubuntu + working-directory: ${{github.workspace}}/buildasan + # 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 + 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 -- cgit v1.2.1 From d5432f54ea3dd9b07e5bd0a51a2a7dbda133f5d1 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 14:26:04 +0700 Subject: Ubuntu CI --- .github/workflows/ci_ubuntu.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index f11099f..c067030 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -12,26 +12,24 @@ env: jobs: CI: + runs-on: ubuntu-latest 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 ] + name: [ "Linux x64" ] sanitize: [ false ] build: - { shell: bash } include: - name: "Ubuntu 20.04" - os: ubuntu-20.04 cc: "clang", cxx: "clang++", build: { shell: bash } include: - name: "Ubuntu 20.04" - os: ubuntu-20.04 cc: "gcc", cxx: "g++", build: { shell: bash } -- cgit v1.2.1 From ed4b088425d822816640c174305cecb16920eacc Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 14:27:17 +0700 Subject: double include --- .github/workflows/ci_ubuntu.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index c067030..c1dd4f2 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -24,12 +24,11 @@ jobs: build: - { shell: bash } include: - - name: "Ubuntu 20.04" + - name: "Clang" cc: "clang", cxx: "clang++", build: { shell: bash } - include: - - name: "Ubuntu 20.04" + - name: "GCC" cc: "gcc", cxx: "g++", build: { shell: bash } -- cgit v1.2.1 From 9990268ac6bcdc45b0d16a88390d1245e34783fd Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 14:39:33 +0700 Subject: ok, rewrite --- .github/workflows/ci_ubuntu.yml | 45 ++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index c1dd4f2..a142eb8 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -12,30 +12,25 @@ env: jobs: CI: - runs-on: ubuntu-latest - name: ${{ matrix.name }} - runs-on: ${{ matrix.os }} - continue-on-error: ${{ contains(matrix.os, 'macos') }} + name: ${ { matrix.config.name } } + runs-on: ${ { matrix.config.os } } strategy: fail-fast: false matrix: - name: [ "Linux x64" ] - sanitize: [ false ] - build: - - { shell: bash } - include: - - name: "Clang" - cc: "clang", - cxx: "clang++", - build: { shell: bash } - - name: "GCC" - cc: "gcc", - cxx: "g++", - build: { shell: bash } - + config: + - { + name: "Ubuntu Latest GCC", + os: ubuntu-latest, + cc: "gcc", cxx: "g++" + } + - { + name: "Ubuntu Latest Clang", + os: ubuntu-latest, + cc: "clang", cxx: "clang++" + } defaults: run: - shell: ${{ matrix.build.shell }} + shell: bash steps: - name: Checkout code @@ -62,8 +57,8 @@ jobs: - name: Configure CMake env: - CC: ${{ matrix.cc }} - CXX: ${{ matrix.cxx }}) + CC: ${{ matrix.config.cc }} + CXX: ${{ matrix.config.cxx }}) 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 @@ -86,8 +81,8 @@ jobs: - name: Configure CMake ASAN Ubuntu env: - CC: ${{ matrix.cc }} - CXX: ${{ matrix.cxx }}) + CC: ${{ matrix.config.cc }} + CXX: ${{ matrix.config.cxx }}) 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 @@ -95,8 +90,8 @@ jobs: - name: Build ASAN Ubuntu env: - CC: ${{ matrix.cc }} - CXX: ${{ matrix.cxx }}) + CC: ${{ matrix.config.cc }} + CXX: ${{ matrix.config.cxx }}) run: cmake --build ${{github.workspace}}/buildasan --config ${{env.BUILD_TYPE}} - name: Test ASAN Ubuntu -- cgit v1.2.1 From c4893738cc03ecb5606f81dcfde3818460923597 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 14:41:12 +0700 Subject: on: fix --- .github/workflows/ci_ubuntu.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index a142eb8..237cdf1 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -2,9 +2,12 @@ name: CI Master on: push: - - 'features/mingw-ci' + branches: + - 'features/mingw-ci' pull_request: + workflow_dispatch: + env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) -- cgit v1.2.1 From 22a16ab62461a69cdedd110b1156070530df1792 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 14:43:01 +0700 Subject: after matrix --- .github/workflows/ci_ubuntu.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 237cdf1..24adaec 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -1,4 +1,4 @@ -name: CI Master +name: CI Ubuntu on: push: @@ -15,8 +15,6 @@ env: jobs: CI: - name: ${ { matrix.config.name } } - runs-on: ${ { matrix.config.os } } strategy: fail-fast: false matrix: @@ -31,6 +29,8 @@ jobs: os: ubuntu-latest, cc: "clang", cxx: "clang++" } + name: ${ { matrix.config.name } } + runs-on: ${ { matrix.config.os } } defaults: run: shell: bash -- cgit v1.2.1 From ca9c1e7da7284fecb2df11f62614835155e5cd80 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 14:45:59 +0700 Subject: simplify matrix --- .github/workflows/ci_ubuntu.yml | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 24adaec..1e9026c 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -15,25 +15,20 @@ env: jobs: CI: + runs-on: ubuntu-latest strategy: fail-fast: false matrix: - config: - - { - name: "Ubuntu Latest GCC", - os: ubuntu-latest, - cc: "gcc", cxx: "g++" - } - - { - name: "Ubuntu Latest Clang", - os: ubuntu-latest, - cc: "clang", cxx: "clang++" - } - name: ${ { matrix.config.name } } - runs-on: ${ { matrix.config.os } } + cc: + - gcc + - clang + cxx: + - g++" + - clang++ + name: ${{ matrix.arch }} defaults: run: - shell: bash + shell: bash steps: - name: Checkout code @@ -60,8 +55,8 @@ jobs: - name: Configure CMake env: - CC: ${{ matrix.config.cc }} - CXX: ${{ matrix.config.cxx }}) + CC: ${{ matrix.cc }} + CXX: ${{ matrix.cxx }} 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 @@ -70,7 +65,7 @@ jobs: - name: Build env: CC: ${{ matrix.cc }} - CXX: ${{ matrix.cxx }}) + CXX: ${{ matrix.cxx }} # Build your program with the given configuration run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel 4 @@ -84,8 +79,8 @@ jobs: - name: Configure CMake ASAN Ubuntu env: - CC: ${{ matrix.config.cc }} - CXX: ${{ matrix.config.cxx }}) + CC: ${{ matrix.cc }} + CXX: ${{ matrix.cxx }} 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 @@ -93,8 +88,8 @@ jobs: - name: Build ASAN Ubuntu env: - CC: ${{ matrix.config.cc }} - CXX: ${{ matrix.config.cxx }}) + CC: ${{ matrix.cc }} + CXX: ${{ matrix.cxx }} run: cmake --build ${{github.workspace}}/buildasan --config ${{env.BUILD_TYPE}} - name: Test ASAN Ubuntu -- cgit v1.2.1 From 74abe40c4a21bfa4d9740150db63fee5168efc97 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 14:47:01 +0700 Subject: use compiler as matrix name --- .github/workflows/ci_ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 1e9026c..7ba630c 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -25,7 +25,7 @@ jobs: cxx: - g++" - clang++ - name: ${{ matrix.arch }} + name: ${{ matrix.cc }} defaults: run: shell: bash -- cgit v1.2.1 From 3f889147211be31f2c84030ae66a8e83129f2faa Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 14:49:39 +0700 Subject: s/"\ --- .github/workflows/ci_ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 7ba630c..a7a84d7 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -23,7 +23,7 @@ jobs: - gcc - clang cxx: - - g++" + - g++ - clang++ name: ${{ matrix.cc }} defaults: -- cgit v1.2.1 From 109517dd63c57cc0797959c2ec437bc1935f95cc Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 14:54:12 +0700 Subject: need one more level --- .github/workflows/ci_ubuntu.yml | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index a7a84d7..19cb8b6 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -19,13 +19,18 @@ jobs: strategy: fail-fast: false matrix: - cc: - - gcc - - clang - cxx: - - g++ - - clang++ - name: ${{ matrix.cc }} + config: + - { + name: "GCC", + cc: "gcc", + cxx: "g++" + } + - { + name: "Clang", + cc: "clang", + cxx: "clang++" + } + name: ${{ matrix.config.name }} defaults: run: shell: bash @@ -55,8 +60,8 @@ jobs: - name: Configure CMake env: - CC: ${{ matrix.cc }} - CXX: ${{ matrix.cxx }} + CC: ${{ matrix.config.cc }} + CXX: ${{ matrix.config.cxx }} 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 @@ -64,8 +69,8 @@ jobs: - name: Build env: - CC: ${{ matrix.cc }} - CXX: ${{ matrix.cxx }} + CC: ${{ matrix.config.cc }} + CXX: ${{ matrix.config.cxx }} # Build your program with the given configuration run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel 4 @@ -79,8 +84,8 @@ jobs: - name: Configure CMake ASAN Ubuntu env: - CC: ${{ matrix.cc }} - CXX: ${{ matrix.cxx }} + CC: ${{ matrix.config.cc }} + CXX: ${{ matrix.config.cxx }} 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 @@ -88,8 +93,8 @@ jobs: - name: Build ASAN Ubuntu env: - CC: ${{ matrix.cc }} - CXX: ${{ matrix.cxx }} + CC: ${{ matrix.config.cc }} + CXX: ${{ matrix.config.cxx }} run: cmake --build ${{github.workspace}}/buildasan --config ${{env.BUILD_TYPE}} - name: Test ASAN Ubuntu -- cgit v1.2.1 From 91c9d2ae1417bc3d58ce127fa0cb96b9909bfc48 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 21:27:40 +0700 Subject: enabled graviton --- .github/workflows/ci_ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 19cb8b6..088ee7b 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -15,7 +15,7 @@ env: jobs: CI: - runs-on: ubuntu-latest + runs-on: [ubuntu-latest, self-hosted] strategy: fail-fast: false matrix: -- cgit v1.2.1 From 056b096fd556351d73012c2de2d071feea6f10af Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 21:50:20 +0700 Subject: disable until firewall is updated --- .github/workflows/ci_ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 088ee7b..19cb8b6 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -15,7 +15,7 @@ env: jobs: CI: - runs-on: [ubuntu-latest, self-hosted] + runs-on: ubuntu-latest strategy: fail-fast: false matrix: -- cgit v1.2.1 From dbf30e2a32ce7ec3ffd4f1cccad04179d56979a7 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 22:19:56 +0700 Subject: let try again --- .github/workflows/ci_ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 19cb8b6..8a09195 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -15,7 +15,7 @@ env: jobs: CI: - runs-on: ubuntu-latest + runs-on: [self-hosted, ubuntu-latest] strategy: fail-fast: false matrix: -- cgit v1.2.1 From 3c45d57fa782d42bde254489de960e33a7c1042c Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 22:21:06 +0700 Subject: most likely the name did not match --- .github/workflows/ci_ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 8a09195..e780966 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -15,7 +15,7 @@ env: jobs: CI: - runs-on: [self-hosted, ubuntu-latest] + runs-on: [graviton, ubuntu-latest] strategy: fail-fast: false matrix: -- cgit v1.2.1 From 3375bf9a93fdf9f10ca6bbf41c19968633bf5c53 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 22:22:23 +0700 Subject: try graviton alone --- .github/workflows/ci_ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index e780966..61790a6 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -15,7 +15,7 @@ env: jobs: CI: - runs-on: [graviton, ubuntu-latest] + runs-on: graviton strategy: fail-fast: false matrix: -- cgit v1.2.1 From fb92bd674aa26abacb735c944ce5f7d22ac8a584 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 22:25:35 +0700 Subject: try self-hosted alone --- .github/workflows/ci_ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 61790a6..e7f5b13 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -15,7 +15,7 @@ env: jobs: CI: - runs-on: graviton + runs-on: self-hosted strategy: fail-fast: false matrix: -- cgit v1.2.1 From e34bc00b291a30355eed5c3b295466b73e02d178 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 22:27:34 +0700 Subject: nope, let disable again --- .github/workflows/ci_ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index e7f5b13..19cb8b6 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -15,7 +15,7 @@ env: jobs: CI: - runs-on: self-hosted + runs-on: ubuntu-latest strategy: fail-fast: false matrix: -- cgit v1.2.1 From 4232794567c52807f54415a6635a4dac54e3697a Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 22:29:33 +0700 Subject: maybe this? --- .github/workflows/ci_ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 19cb8b6..8859663 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -15,7 +15,7 @@ env: jobs: CI: - runs-on: ubuntu-latest + runs-on: [self-hosted, linux, ARM64] strategy: fail-fast: false matrix: -- cgit v1.2.1 From ce2ecaabc82ef178efe40c7573427f86364ea679 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 22:31:52 +0700 Subject: maybe this? --- .github/workflows/ci_ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 8859663..9f62e07 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -15,7 +15,7 @@ env: jobs: CI: - runs-on: [self-hosted, linux, ARM64] + runs-on: [self-hosted, linux, ARM64, aws] strategy: fail-fast: false matrix: -- cgit v1.2.1 From 0aa37d1d543a03228cb4cfd00cb767b1c51ea179 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 22:35:59 +0700 Subject: add cmake --- .github/workflows/ci_ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 9f62e07..90678ef 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -53,7 +53,7 @@ jobs: env: DEBIAN_FRONTEND: noninteractive run: sudo -E apt-get install --fix-missing -qq -o Acquire::Retries=3 - libjpeg-turbo8-dev libimagequant-dev libde265-dev + cmake 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 -- cgit v1.2.1 From 94a5b387cf70e659412d440df68460e3252c4114 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 22:41:14 +0700 Subject: debug CC/CXX --- .github/workflows/ci_ubuntu.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 90678ef..383051a 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -53,17 +53,25 @@ jobs: env: DEBIAN_FRONTEND: noninteractive run: sudo -E apt-get install --fix-missing -qq -o Acquire::Retries=3 - cmake libjpeg-turbo8-dev libimagequant-dev libde265-dev + cmake clang-12 gcc 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: Debug CC Env + env: + CC: ${{ matrix.config.cc }} + CXX: ${{ matrix.config.cxx }} + run: | + echo $CC + echo $CXX + - name: Configure CMake env: CC: ${{ matrix.config.cc }} CXX: ${{ matrix.config.cxx }} run: - cmake -DENABLE_PNG=1 -DENABLE_FREETYPE=1 -DENABLE_JPEG=1 -DENABLE_WEBP=1 + 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}} -- cgit v1.2.1 From 359fa9c21894e8d57adaca3dbda94782c0dc7e73 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 22:41:54 +0700 Subject: debug CC/CXX --- .github/workflows/ci_ubuntu.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 383051a..b87c62d 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -62,9 +62,9 @@ jobs: env: CC: ${{ matrix.config.cc }} CXX: ${{ matrix.config.cxx }} - run: | - echo $CC - echo $CXX + run: | + echo $CC + echo $CXX - name: Configure CMake env: -- cgit v1.2.1 From 0e4df96cbe1f2e35b16fddc9cd2e7d38ba092c28 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 22:51:45 +0700 Subject: build essentials required for g++ --- .github/workflows/ci_ubuntu.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index b87c62d..46ee4ae 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -27,8 +27,8 @@ jobs: } - { name: "Clang", - cc: "clang", - cxx: "clang++" + cc: "clang-12", + cxx: "clang-cpp-12" } name: ${{ matrix.config.name }} defaults: @@ -53,7 +53,7 @@ jobs: env: DEBIAN_FRONTEND: noninteractive run: sudo -E apt-get install --fix-missing -qq -o Acquire::Retries=3 - cmake clang-12 gcc libjpeg-turbo8-dev libimagequant-dev libde265-dev + cmake clang-12 gcc gcc-c++ 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 -- cgit v1.2.1 From 5f7788d0ceb4c8305601f83eae46c600ceffac9c Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 22:52:43 +0700 Subject: build essentials required for g++ --- .github/workflows/ci_ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 46ee4ae..d736ecd 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -53,7 +53,7 @@ jobs: env: DEBIAN_FRONTEND: noninteractive run: sudo -E apt-get install --fix-missing -qq -o Acquire::Retries=3 - cmake clang-12 gcc gcc-c++ build-essential libjpeg-turbo8-dev libimagequant-dev libde265-dev + 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 -- cgit v1.2.1 From 65914f9e904b79639d7773ab9d307b925dfd6e4f Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 22:54:34 +0700 Subject: #ifdef --- src/gd_interpolation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gd_interpolation.c b/src/gd_interpolation.c index aa96244..9f743fe 100644 --- a/src/gd_interpolation.c +++ b/src/gd_interpolation.c @@ -72,7 +72,7 @@ TODO: #include "gdhelpers.h" #include "gd_intern.h" -#ifdef define(_MSC_VER) +#ifdef _MSC_VER # pragma optimize("t", on) # include #endif -- cgit v1.2.1 From c6fcb5d4cbd4b60ad70b2d07de54ffd3b6569a1c Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 23:42:39 +0700 Subject: These are not .c files, should work on gcc and make clang linker happy --- src/CMakeLists.txt | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 63bfc7e..3839bc7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,13 +1,9 @@ SET (LIBGD_SRC_FILES - bmp.h gd.c - gd.h gd_avif.c gd_bmp.c gd_color.c - gd_color.h gd_color_map.c - gd_color_map.h gd_color_match.c gd_crop.c gd_filename.c @@ -17,25 +13,20 @@ SET (LIBGD_SRC_FILES gd_gif_in.c gd_gif_out.c gd_heif.c - gd_intern.h gd_interpolation.c gd_io.c - gd_io.h gd_io_dp.c gd_io_file.c gd_io_ss.c gd_io_stream.cxx - gd_io_stream.h gd_jpeg.c gd_matrix.c gd_nnquant.c - gd_nnquant.h gd_png.c gd_rotate.c gd_security.c gd_ss.c gd_tga.c - gd_tga.h gd_tiff.c gd_topal.c gd_transform.c @@ -44,30 +35,19 @@ SET (LIBGD_SRC_FILES gd_webp.c gd_xbm.c gdcache.c - gdcache.h gdfontg.c - gdfontg.h gdfontl.c - gdfontl.h gdfontmb.c - gdfontmb.h gdfonts.c - gdfonts.h gdfontt.c - gdfontt.h gdft.c gdfx.c - gdfx.h gdhelpers.c - gdhelpers.h gdkanji.c gdpp.cxx - gdpp.h gdtables.c gdxpm.c - jisx0208.h wbmp.c - wbmp.h ) # Static library just for utility programs. -- cgit v1.2.1 From 40b38f32261253838b52fbf2043daeae7e9232ee Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Mon, 30 Aug 2021 01:58:47 +0700 Subject: skip clang for now --- .github/workflows/ci_ubuntu.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index d736ecd..45c5317 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -25,11 +25,11 @@ jobs: cc: "gcc", cxx: "g++" } - - { - name: "Clang", - cc: "clang-12", - cxx: "clang-cpp-12" - } + # - { + # name: "Clang", + # cc: "clang-12", + # cxx: "clang-cpp-12" + # } name: ${{ matrix.config.name }} defaults: run: -- cgit v1.2.1 From f4f4c3ce1176c1d33830cf5f127779f005b45214 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Mon, 30 Aug 2021 02:27:15 +0700 Subject: attempt to run on external host and gh hosts --- .github/workflows/ci_ubuntu.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 45c5317..d9b4a45 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -15,21 +15,35 @@ env: jobs: CI: + runs-on: ${{ matrix.config.os }} runs-on: [self-hosted, linux, ARM64, aws] strategy: fail-fast: false matrix: config: - { - name: "GCC", + os: [self-hosted, linux, ARM64, aws], + name: "Ubuntu Graviton GCC", cc: "gcc", cxx: "g++" - } + }, # - { # name: "Clang", # cc: "clang-12", # cxx: "clang-cpp-12" # } + - { + os: ubuntu-latest, + name: "Ubuntu x86 GCC", + cc: "gcc", + cxx: "g++" + }, + - { + os: ubuntu-latest, + name: "Ubuntu x86 Clang", + cc: "clang-12", + cxx: "clang-cpp-12" + } name: ${{ matrix.config.name }} defaults: run: -- cgit v1.2.1 From 7559717fd3ebba0bbc41046b2cd727daaa2969c1 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Mon, 30 Aug 2021 02:29:20 +0700 Subject: let figure out the syntax... --- .github/workflows/ci_ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index d9b4a45..f010500 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -22,7 +22,7 @@ jobs: matrix: config: - { - os: [self-hosted, linux, ARM64, aws], + os: "self-hosted, linux, ARM64, aws", name: "Ubuntu Graviton GCC", cc: "gcc", cxx: "g++" -- cgit v1.2.1 From ccc81cc84de985e3d05d66258d966b5970ed411a Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Mon, 30 Aug 2021 02:30:47 +0700 Subject: let figure out the syntax... --- .github/workflows/ci_ubuntu.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index f010500..64a7991 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -16,7 +16,6 @@ env: jobs: CI: runs-on: ${{ matrix.config.os }} - runs-on: [self-hosted, linux, ARM64, aws] strategy: fail-fast: false matrix: -- cgit v1.2.1 From 87d3353220bff40db9631dd47fbe9c56e0a11974 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Mon, 30 Aug 2021 02:32:24 +0700 Subject: let figure out the syntax... --- .github/workflows/ci_ubuntu.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 64a7991..4c00290 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -19,18 +19,6 @@ jobs: strategy: fail-fast: false matrix: - config: - - { - os: "self-hosted, linux, ARM64, aws", - name: "Ubuntu Graviton GCC", - cc: "gcc", - cxx: "g++" - }, - # - { - # name: "Clang", - # cc: "clang-12", - # cxx: "clang-cpp-12" - # } - { os: ubuntu-latest, name: "Ubuntu x86 GCC", -- cgit v1.2.1 From 232c4cef126544f3be4cff00a69f156325e3ee50 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Mon, 30 Aug 2021 02:40:10 +0700 Subject: let figure out the syntax...3 --- .github/workflows/ci_ubuntu.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 4c00290..e5497be 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -15,18 +15,16 @@ env: jobs: CI: - runs-on: ${{ matrix.config.os }} + runs-on: [ubuntu-latest, graviton] strategy: fail-fast: false matrix: - { - os: ubuntu-latest, name: "Ubuntu x86 GCC", cc: "gcc", cxx: "g++" }, - { - os: ubuntu-latest, name: "Ubuntu x86 Clang", cc: "clang-12", cxx: "clang-cpp-12" -- cgit v1.2.1 From 92f6a1144527f7a038228f15353adce3db4931e7 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Mon, 30 Aug 2021 02:45:22 +0700 Subject: let figure out the syntax...4 --- .github/workflows/ci_ubuntu.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index e5497be..3184fe3 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -19,6 +19,7 @@ jobs: strategy: fail-fast: false matrix: + config: - { name: "Ubuntu x86 GCC", cc: "gcc", -- cgit v1.2.1 From ffa9ccb236ded18836a8b62acb216911dde18680 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Mon, 30 Aug 2021 02:52:19 +0700 Subject: let figure out the syntax...5 --- .github/workflows/ci_ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 3184fe3..5e59f7a 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -24,7 +24,7 @@ jobs: name: "Ubuntu x86 GCC", cc: "gcc", cxx: "g++" - }, + } - { name: "Ubuntu x86 Clang", cc: "clang-12", -- cgit v1.2.1 From b0370d449b69e32e1703ee08bbc2270824e54714 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Mon, 30 Aug 2021 02:54:06 +0700 Subject: let figure out the syntax...6 --- .github/workflows/ci_ubuntu.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 5e59f7a..0af5d09 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -15,18 +15,20 @@ env: jobs: CI: - runs-on: [ubuntu-latest, graviton] + runs-on: ${{ matrix.config.os }} strategy: fail-fast: false matrix: config: - { name: "Ubuntu x86 GCC", + os: ubuntu-latest, cc: "gcc", cxx: "g++" } - { name: "Ubuntu x86 Clang", + os: ubuntu-latest, cc: "clang-12", cxx: "clang-cpp-12" } -- cgit v1.2.1 From 9c58bf5f62b782b04c6f4d7895282601bdf09ff4 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Mon, 30 Aug 2021 02:58:57 +0700 Subject: OK clang on linux seems to need that fix/change, disable for now --- .github/workflows/ci_ubuntu.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 0af5d09..dab0a6c 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -26,12 +26,24 @@ jobs: cc: "gcc", cxx: "g++" } + # - { + # name: "Ubuntu x86 Clang", + # os: [self-hosted, linux, ARM64, aws], + # cc: "clang-12", + # cxx: "clang-cpp-12" + # } - { - name: "Ubuntu x86 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++" } + # - { + # name: "Ubuntu Graviton Clang", + # os: [self-hosted, Linux, ARM64, graviton], + # cc: "clang-12", + # cxx: "clang-cpp-12" + # } name: ${{ matrix.config.name }} defaults: run: -- cgit v1.2.1 From d0691cdd57a91e4197148ef637ab5231dabc839c Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Mon, 30 Aug 2021 03:56:14 +0700 Subject: just add CFLAGS for graviton and intel, cleanup --- .github/workflows/ci_ubuntu.yml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index dab0a6c..113ddf4 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -21,10 +21,11 @@ jobs: matrix: config: - { - name: "Ubuntu x86 GCC", + name: "Ubuntu Intel GCC", os: ubuntu-latest, cc: "gcc", - cxx: "g++" + cxx: "g++", + cflags: "-msse2" } # - { # name: "Ubuntu x86 Clang", @@ -36,7 +37,8 @@ jobs: name: "Ubuntu Graviton GCC", os: [self-hosted, Linux, ARM64, graviton], cc: "gcc", - cxx: "g++" + cxx: "g++", + cflags: "-march=armv8.2-a+fp16+rcpc+dotprod+crypto -mtune=neoverse-n1" } # - { # name: "Ubuntu Graviton Clang", @@ -76,14 +78,17 @@ jobs: env: CC: ${{ matrix.config.cc }} CXX: ${{ matrix.config.cxx }} + CFLAGS: ${{ matrix.config.cflags }} run: | echo $CC echo $CXX + echo $CFLAGS - name: Configure CMake 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 @@ -93,10 +98,10 @@ jobs: env: CC: ${{ matrix.config.cc }} CXX: ${{ matrix.config.cxx }} - # Build your program with the given configuration + CFLAGS: ${{ matrix.config.cflags }} run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel 4 - - name: Test Ubuntu + - name: Test working-directory: ${{github.workspace}}/build run: | export TMP=${{runner.temp}} @@ -104,25 +109,25 @@ jobs: 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 Ubuntu + - name: Configure CMake ASAN 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 -DBUILD_TEST=1 -B ${{github.workspace}}/buildasan -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} - - name: Build ASAN Ubuntu + - name: Build ASAN 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 Ubuntu + - name: Test ASAN working-directory: ${{github.workspace}}/buildasan - # 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 -- cgit v1.2.1 From 4ff557bc31fc12fba0a57554bf5f596e7fb3f15b Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Mon, 30 Aug 2021 04:09:16 +0700 Subject: disable these two on Graviton2, specific during runs it seems. Building&Running the tests manually 100s never fail --- tests/gdimagecopyresampled/bug00201.c | 3 ++- tests/gdimagegrayscale/basic.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/gdimagecopyresampled/bug00201.c b/tests/gdimagecopyresampled/bug00201.c index aa3cf73..37e16f9 100644 --- a/tests/gdimagecopyresampled/bug00201.c +++ b/tests/gdimagecopyresampled/bug00201.c @@ -44,7 +44,8 @@ int main() FILE *fp; // Rounding issue, won't fix as it only happens on mingw 32bit. -#if defined(__MINGW32__) +// __aarch64__/graviton. It fails within the CI while outside is 100% success over 100s builds&runs +#if defined(__MINGW32__) || defined(__aarch64__) || defined(_M_ARM64) return 77; #endif background = blank_image(DEST_WIDTH,DEST_HEIGHT); diff --git a/tests/gdimagegrayscale/basic.c b/tests/gdimagegrayscale/basic.c index c8d49ba..6b6b01c 100644 --- a/tests/gdimagegrayscale/basic.c +++ b/tests/gdimagegrayscale/basic.c @@ -11,7 +11,8 @@ int main() FILE *fp; char *path; // Rounding issue, won't fix as it only happens on mingw 32bit. -#if defined(__MINGW32__) +// __aarch64__/graviton. It fails within the CI while outside is 100% success over 100s builds&runs +#if defined(__MINGW32__) || defined(__aarch64__) || defined(_M_ARM64) return 77; #endif fp = gdTestFileOpen2("gdimagegrayscale", "basic.png"); -- cgit v1.2.1 From 91ba55ae95a087593a4143706bcc14a03b7d797a Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Mon, 30 Aug 2021 04:09:32 +0700 Subject: update flags and naming --- .github/workflows/ci_ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 113ddf4..7ce8c02 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -38,7 +38,7 @@ jobs: os: [self-hosted, Linux, ARM64, graviton], cc: "gcc", cxx: "g++", - cflags: "-march=armv8.2-a+fp16+rcpc+dotprod+crypto -mtune=neoverse-n1" + cflags: "-march=armv8.2-a+fp16+rcpc+dotprod+crypto+sve -mtune=neoverse-n1" } # - { # name: "Ubuntu Graviton Clang", -- cgit v1.2.1 From bb0a4a23c231451df0f8a55cd710636e83ef846c Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Mon, 30 Aug 2021 19:30:36 +0700 Subject: add configure&make&make package. No test, we need cmake for that --- .github/workflows/ci_ubuntu.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 7ce8c02..53dc931 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -133,6 +133,12 @@ jobs: echo "TMP=${{github.temp}}" >> $GITHUB_ENV CTEST_OUTPUT_ON_FAILURE=1 ctest -C ${{env.BUILD_TYPE}} + -name: Configure and Make + run: | + /configure --with-png --with-jpeg --with-ramq --with-heif=/home/pierre/usr/ --with-xpm --with-tiff --with-webp --with-liq --enable-gd --enable-gd-formats --with-zlib + make + make package + - name: Output Log if: contains(matrix.os, 'ubuntu') run: | -- cgit v1.2.1 From 3977049c75720e647c7611ef7b7282d9ffd46ec5 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Mon, 30 Aug 2021 19:32:11 +0700 Subject: -[ ]name --- .github/workflows/ci_ubuntu.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 53dc931..0805b43 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -133,9 +133,10 @@ jobs: echo "TMP=${{github.temp}}" >> $GITHUB_ENV CTEST_OUTPUT_ON_FAILURE=1 ctest -C ${{env.BUILD_TYPE}} - -name: Configure and Make + - name: Configure and Make + working-directory: ${{github.workspace}}/ run: | - /configure --with-png --with-jpeg --with-ramq --with-heif=/home/pierre/usr/ --with-xpm --with-tiff --with-webp --with-liq --enable-gd --enable-gd-formats --with-zlib + ./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 package -- cgit v1.2.1 From eed62cd78a1f9bc0ecd1a0b551a9168796ae496f Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Mon, 30 Aug 2021 19:35:33 +0700 Subject: missing bootstrap call --- .github/workflows/ci_ubuntu.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 0805b43..c36fbb7 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -136,6 +136,7 @@ jobs: - 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 package -- cgit v1.2.1 From 61161dcdf1c7299bfc3f460d2e5b2ba98db06778 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Mon, 30 Aug 2021 19:39:26 +0700 Subject: make dist --- .github/workflows/ci_ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index c36fbb7..269b390 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -139,7 +139,7 @@ jobs: ./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 package + make dist - name: Output Log if: contains(matrix.os, 'ubuntu') -- cgit v1.2.1 From ad09e68eb42e4982c1fa62cf7708ffdfb3a17e75 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Mon, 30 Aug 2021 19:44:02 +0700 Subject: install dh-autoreconf --- .github/workflows/ci_ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 269b390..85f3a97 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -72,7 +72,7 @@ jobs: 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 + libavifile-0.7-dev libxpm-dev libraqm-dev dh-autoreconf - name: Debug CC Env env: -- cgit v1.2.1 From c5b5ce4334c6be88e70b02553eb8765d7fa2bf7f Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Tue, 31 Aug 2021 10:27:18 +0700 Subject: use this one for MacOs only --- .github/workflows/ci_master.yml | 109 +++------------------------------------- 1 file changed, 6 insertions(+), 103 deletions(-) diff --git a/.github/workflows/ci_master.yml b/.github/workflows/ci_master.yml index a5947d6..4b3e6c3 100644 --- a/.github/workflows/ci_master.yml +++ b/.github/workflows/ci_master.yml @@ -19,23 +19,17 @@ jobs: fail-fast: false matrix: name: [ "Linux x64 (Ubuntu 20.04)" ] - os: [ ubuntu-20.04 ] + os: [ macos-latest ] 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: @@ -45,44 +39,12 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - - name: Update apt (Ubuntu) - if: contains(matrix.os, 'ubuntu') - env: - DEBIAN_FRONTEND: noninteractive - run: sudo -E apt-get update -qq -o Acquire::Retries=3 - - - name: Add libheif PPA (Ubuntu) - 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: 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: Install macOS dependencies - if: contains(matrix.os, 'macos') + - name: Install dependencies run: | brew install libheif libjpeg-turbo libimagequant libde265 x265 - - name: Prepare macOS environment - if: contains(matrix.os, 'macos') + - name: Prepare environment + run: | sudo xcode-select --switch /Library/Developer/CommandLineTools/ echo "JOBS=$(sysctl -n hw.logicalcpu)" >> $GITHUB_ENV @@ -100,43 +62,18 @@ jobs: ls /usr/local/Cellar/libpng/1.6.37/lib/ ${{github.workspace}}/.github/scripts/removemono.sh - - name: Configure CMake MacOS - if: contains(matrix.os, 'macos') + - 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}} - - uses: actions/cache@v2 - with: - path: C:\vcpkg\downloads - key: ${{ runner.os }}-vcpkg-download-${{ matrix.os }}-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-vcpkg-download-${{ matrix.os }}- - ${{ runner.os }}-vcpkg-download- - - - 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: 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') + - 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 @@ -146,40 +83,6 @@ jobs: 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:TMP=${{github.temp}} - $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: | - export TMP=${{runner.temp}} - echo "TMP=${{github.temp}}" >> $GITHUB_ENV - CTEST_OUTPUT_ON_FAILURE=1 ctest -C ${{env.BUILD_TYPE}} - - name: Output Log if: contains(matrix.os, 'ubuntu') run: | -- cgit v1.2.1 From 4132b4ef44568ec823e305f0cc887e171dc236b3 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Tue, 31 Aug 2021 10:28:05 +0700 Subject: ren to macos only --- .github/workflows/ci_macos.yaml | 91 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 .github/workflows/ci_macos.yaml diff --git a/.github/workflows/ci_macos.yaml b/.github/workflows/ci_macos.yaml new file mode 100644 index 0000000..4b3e6c3 --- /dev/null +++ b/.github/workflows/ci_macos.yaml @@ -0,0 +1,91 @@ +name: CI Master + +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 -- cgit v1.2.1 From 748ceaf963335ad0af020e6e4b3ad7f71cc11c04 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Tue, 31 Aug 2021 10:29:43 +0700 Subject: renamed --- .github/workflows/ci_master.yml | 91 ----------------------------------------- 1 file changed, 91 deletions(-) delete mode 100644 .github/workflows/ci_master.yml diff --git a/.github/workflows/ci_master.yml b/.github/workflows/ci_master.yml deleted file mode 100644 index 4b3e6c3..0000000 --- a/.github/workflows/ci_master.yml +++ /dev/null @@ -1,91 +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: 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 -- cgit v1.2.1 From eaf63bd0bfe3a4e918d4b0a5b2425204f60cbb0f Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Tue, 31 Aug 2021 10:31:32 +0700 Subject: consistent naming --- .github/workflows/ci_macos.yml | 91 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 .github/workflows/ci_macos.yml diff --git a/.github/workflows/ci_macos.yml b/.github/workflows/ci_macos.yml new file mode 100644 index 0000000..4b3e6c3 --- /dev/null +++ b/.github/workflows/ci_macos.yml @@ -0,0 +1,91 @@ +name: CI Master + +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 -- cgit v1.2.1 From 36e18cc735ace4c21b42ecf0676e60af3fcdcbc2 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Tue, 31 Aug 2021 10:31:57 +0700 Subject: renamed --- .github/workflows/ci_macos.yaml | 91 ----------------------------------------- 1 file changed, 91 deletions(-) delete mode 100644 .github/workflows/ci_macos.yaml diff --git a/.github/workflows/ci_macos.yaml b/.github/workflows/ci_macos.yaml deleted file mode 100644 index 4b3e6c3..0000000 --- a/.github/workflows/ci_macos.yaml +++ /dev/null @@ -1,91 +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: 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 -- cgit v1.2.1 From 4f0c76314cdbe0a37d704ca158889f92451d81bb Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Tue, 31 Aug 2021 10:33:13 +0700 Subject: renamed --- .github/workflows/ci_macos.yaml | 91 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 .github/workflows/ci_macos.yaml diff --git a/.github/workflows/ci_macos.yaml b/.github/workflows/ci_macos.yaml new file mode 100644 index 0000000..734995f --- /dev/null +++ b/.github/workflows/ci_macos.yaml @@ -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 -- cgit v1.2.1 From 5ef6c1510e68741c51bbb65d93a211095f0b14b7 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Tue, 31 Aug 2021 10:34:55 +0700 Subject: wondering why mv keeps files as deleted all the time now... --- .github/workflows/ci_macos.yaml | 91 ----------------------------------------- 1 file changed, 91 deletions(-) delete mode 100644 .github/workflows/ci_macos.yaml diff --git a/.github/workflows/ci_macos.yaml b/.github/workflows/ci_macos.yaml deleted file mode 100644 index 734995f..0000000 --- a/.github/workflows/ci_macos.yaml +++ /dev/null @@ -1,91 +0,0 @@ -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 -- cgit v1.2.1 From 7af412346e2ee517694254c2d5c5a2cb3205d9cc Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Tue, 31 Aug 2021 11:38:12 +0700 Subject: CI name MacOS --- .github/workflows/ci_macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_macos.yml b/.github/workflows/ci_macos.yml index 4b3e6c3..734995f 100644 --- a/.github/workflows/ci_macos.yml +++ b/.github/workflows/ci_macos.yml @@ -1,4 +1,4 @@ -name: CI Master +name: CI MacOS on: push: -- cgit v1.2.1 From 45d561fd06543e1b00bfcf85d54a7b6036784954 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Tue, 31 Aug 2021 12:30:20 +0700 Subject: #744, add cmake clang module, it builds now, but it fails weidly. --- cmake/modules/linux-clang.cmake | 239 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 239 insertions(+) create mode 100644 cmake/modules/linux-clang.cmake diff --git a/cmake/modules/linux-clang.cmake b/cmake/modules/linux-clang.cmake new file mode 100644 index 0000000..ab2114e --- /dev/null +++ b/cmake/modules/linux-clang.cmake @@ -0,0 +1,239 @@ +# This file is part of the cmake-tools project. It was retrieved from +# https://github.com/wang-bin/cmake-tools +# +# The cmake-tools project is licensed under the new MIT license. +# +# Copyright (c) 2017-2021, Wang Bin +# +# clang + lld to cross build apps for linux +# +# LINUX_FLAGS: flags for both compiler and linker, e.g. --target=arm-rpi-linux-gnueabihf ... +# CMAKE_SYSTEM_PROCESSOR: REQUIRED +# USE_CRT: gnu(default), musl + +option(CLANG_AS_LINKER "use clang as linker to invoke lld. MUST ON for now" ON) +option(USE_LIBCXX "use libc++ instead of libstdc++" OFF) +option(USE_CXXABI "can be c++abi, stdc++ and supc++. Only required if libc++ is built with none abi" OFF) # default value must be bool +option(USE_TARGET_LIBCXX "libc++ headers bundled with clang are searched and used by default. usually safe if abi is stable. set to true to use target libc++ if version is different" OFF) +option(USE_COMPILER_RT "use compiler-rt instead of libgcc as compiler runtime library" OFF) +option(USE_STD_TLS "use std c++11 thread_local. Only libc++abi 4.0+ is safe for any libc runtime. Turned off internally when necessary" ON) # sunxi ubuntu12.04(glibc-2.15)/rpi(glibc2.13) libc is too old to have __cxa_thread_atexit_impl(requires glibc2.18) +option(USE_STDCXX "libstdc++ version to use, MUST be >= 4.8. default is 0, selected by compiler" 0) + +if(NOT OS) + set(OS Linux) +endif() +set(CMAKE_SYSTEM_NAME Linux) # assume host build if not set, host flags will be used, e.g. apple clang flags are added on macOS +if(NOT CMAKE_SYSTEM_PROCESSOR) + message("CMAKE_SYSTEM_PROCESSOR for target is not set. Must be aarch64(arm64), armv7(arm), x86(i386,i686), x64(x86_64). Assumeme build for host arch: ${CMAKE_HOST_SYSTEM_PROCESSOR}.") + set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_HOST_SYSTEM_PROCESSOR}) +endif() +if(CMAKE_SYSTEM_PROCESSOR MATCHES "ar.*64") + set(TRIPLE_ARCH aarch64) +elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm") # arm.*hf? + set(TRIPLE_ARCH arm) + set(TRIPLE_ABI eabihf) +elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "64") + set(TRIPLE_ARCH x86_64) +elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "86") + set(TRIPLE_ARCH i386) +endif() +if(NOT USE_CRT) # can be gnu, musl + set(USE_CRT gnu) +endif() +set(TARGET_TRIPPLE ${TRIPLE_ARCH}-linux-${USE_CRT}${TRIPLE_ABI}) +set(LINUX_FLAGS "--target=${TARGET_TRIPPLE} ${LINUX_FLAGS}") + +set(CMAKE_LIBRARY_ARCHITECTURE ${TARGET_TRIPPLE}) # FIND_LIBRARY search subdir +# "/usr/local/opt/llvm/bin/ld.lld" --sysroot=/Users/wangbin/dev/rpi/sysroot -pie -X --eh-frame-hdr -m armelf_linux_eabi -dynamic-linker /lib/ld-linux-armhf.so.3 -o test/audiodec /Users/wangbin/dev/rpi/sysroot/usr/lib/../lib/Scrt1.o /Users/wangbin/dev/rpi/sysroot/usr/lib/../lib/crti.o /Users/wangbin/dev/rpi/sysroot/lib/../lib/crtbeginS.o -L/Users/wangbin/dev/rpi/sysroot/lib/../lib -L/Users/wangbin/dev/rpi/sysroot/usr/lib/../lib -L/Users/wangbin/dev/rpi/sysroot/lib -L/Users/wangbin/dev/rpi/sysroot/usr/lib --build-id --as-needed --gc-sections --enable-new-dtags -z origin "-rpath=\$ORIGIN" "-rpath=\$ORIGIN/lib" -rpath-link /Users/wangbin/dev/multimedia/mdk/external/lib/rpi/armv6 test/CMakeFiles/audiodec.dir/audiodec.cpp.o libmdk.so.0.1.0 -lc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /Users/wangbin/dev/rpi/sysroot/lib/../lib/crtendS.o /Users/wangbin/dev/rpi/sysroot/usr/lib/../lib/crtn.o + +# Export configurable variables for the try_compile() command. Or set env var like llvm +set(CMAKE_TRY_COMPILE_PLATFORM_VARIABLES + CMAKE_SYSTEM_PROCESSOR + CMAKE_C_COMPILER # find_program only once + LINUX_FLAGS + #LINUX_SYSROOT + LD_LLD +) + +if(NOT CMAKE_C_COMPILER) + find_program(CMAKE_C_COMPILER clang-12 clang-11 clang-10 clang-9 clang-8 clang-7 clang-6.0 clang-5.0 clang-4.0 clang + HINTS /usr/local/opt/llvm/bin + CMAKE_FIND_ROOT_PATH_BOTH + ) +endif() + +if(CMAKE_C_COMPILER) + if(NOT CMAKE_CXX_COMPILER) + string(REGEX REPLACE "clang(|-[0-9]+[\\.0]*)$" "clang++\\1" CMAKE_CXX_COMPILER "${CMAKE_C_COMPILER}") + if(NOT EXISTS "${CMAKE_CXX_COMPILER}") # homebrew, clang-6.0 but clang++ has no suffix + string(REGEX REPLACE "clang(|-[0-9]+[\\.0]*)$" "clang++" CMAKE_CXX_COMPILER "${CMAKE_C_COMPILER}") + endif() + endif() + if(NOT LD_LLD) + string(REGEX REPLACE ".*clang(|-[0-9]+[\\.0]*)$" "lld\\1" LD_LLD "${CMAKE_C_COMPILER}") + execute_process( + COMMAND ${CMAKE_C_COMPILER} -print-prog-name=${LD_LLD} + OUTPUT_VARIABLE LD_LLD_PATH + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + if(NOT EXISTS ${LD_LLD_PATH}) # llvm on macOS(via brew) has lld but not lld-? + set(LD_LLD lld) + endif() + endif() +else() + set(CMAKE_C_COMPILER clang) + set(CMAKE_CXX_COMPILER clang++) + set(LD_LLD lld) +endif() + +# llvm-ranlib is for bitcode. but seems works for others. "llvm-ar -s" should be better +# macOS system ranlib does not work +execute_process( + COMMAND ${CMAKE_C_COMPILER} -print-prog-name=llvm-ranlib + OUTPUT_VARIABLE CMAKE_RANLIB + OUTPUT_STRIP_TRAILING_WHITESPACE +) +# llvm-ar for all host platforms. support all kinds of file, including bitcode +execute_process( + COMMAND ${CMAKE_C_COMPILER} -print-prog-name=llvm-ar + OUTPUT_VARIABLE CMAKE_LLVM_AR + OUTPUT_STRIP_TRAILING_WHITESPACE +) +execute_process( + COMMAND ${CMAKE_C_COMPILER} -print-prog-name=llvm-readelf + OUTPUT_VARIABLE READELF + OUTPUT_STRIP_TRAILING_WHITESPACE +) +execute_process( + COMMAND ${CMAKE_C_COMPILER} -print-prog-name=llvm-objcopy + OUTPUT_VARIABLE CMAKE_LLVM_OBJCOPY + OUTPUT_STRIP_TRAILING_WHITESPACE +) +get_filename_component(LLVM_DIR ${CMAKE_RANLIB} DIRECTORY) + +# Sysroot. +#message("CMAKE_SYSROOT_COMPILE: ${CMAKE_SYSROOT_COMPILE}, ${CMAKE_CROSSCOMPILING}") +if(EXISTS "${LINUX_SYSROOT}") + set(CMAKE_SYSROOT ${LINUX_SYSROOT}) +# CMake 3.9 tries to use CMAKE_SYSROOT_COMPILE before it gets set from CMAKE_SYSROOT, which leads to using the system's /usr/include. Set this manually. +# https://github.com/android-ndk/ndk/issues/467 + set(CMAKE_SYSROOT_COMPILE "${CMAKE_SYSROOT}") +endif() +if(CMAKE_CROSSCOMPILING) # default is true + set(ENV{PKG_CONFIG_PATH} "${CMAKE_SYSROOT}/usr/share/pkgconfig:${CMAKE_SYSROOT}/usr/lib/${TARGET_TRIPPLE}/pkgconfig") +endif() +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + +if(USE_LIBCXX) + if(CMAKE_CROSSCOMPILING AND USE_TARGET_LIBCXX) # assume libc++ abi is stable, then USE_TARGET_LIBCXX=0 is ok, i.e. build with host libc++, but run with a different target libc++ version + # headers in clang builtin include dir(stddef.h etc.). -nobuiltininc makes cross build harder if a header is not found in sysroot(include_next stddef.h in /usr/include/linux/) + # -nostdinc++: clang always search libc++(-stdlib=libc++) in host toolchain, may mismatch with target libc++ version, and results in conflict(include_next) + if(CMAKE_VERSION VERSION_LESS 3.3) + set(LINUX_FLAGS_CXX "${LINUX_FLAGS_CXX} -nostdinc++ -iwithsysroot /usr/include/c++/v1") + else() + #add_compile_options("$<$:-stdlib=libc++>") + add_compile_options("$<$:-nostdinc++;-iwithsysroot;/usr/include/c++/v1>") + endif() + # -stdlib=libc++ is not required if -nostdinc++ is set(otherwise warnings) + link_libraries(-stdlib=libc++) #unlike SUNXI_LD_FLAGS, it will append flags to last + else() + set(LINUX_FLAGS_CXX "${LINUX_FLAGS_CXX} -stdlib=libc++") # for both compiler & linker + endif() + if(USE_CXXABI) + set(LINUX_LINK_FLAGS_CXX "${LINUX_LINK_FLAGS_CXX} -l${USE_CXXABI}") # required if libc++ is built with none abi. otherwise libc++.so is a ld script contains an abi library, e.g. -lc++abi/-lstdc++/-lsupc++ + endif() + #check_library_exists: compiler must be detected + # old libc + old libc++abi: DO NOT use thread_local + # new/old libc + new libc++abi: use libc++abi tls/fallback + # new libc + old libc++abi: can not ensure libc runtime thread_local support + # old libc + stdc++ abi: disable thread_local, stdc++(g++8.0) does not use __cxa_thread_atexit_impl as weak symbol, so can not run on old glibc runtime + set(LIBCXX_SO "${CMAKE_SYSROOT}/usr/lib/${TARGET_TRIPPLE}/libc++.so.1") + if(EXISTS ${LIBCXX_SO}) + execute_process( + COMMAND ${READELF} -needed-libs ${LIBCXX_SO} + OUTPUT_VARIABLE LIBCXX_NEEDED + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + string(FIND "${LIBCXX_NEEDED}" libc++abi.so.1 LIBCXX_ABI_LIBCXXABI) # TODO: built with static libc++abi, check exported abi symbols + if(LIBCXX_ABI_LIBCXXABI EQUAL -1) + #message("libc++ is not built with libc++abi. not safe to use thread_local on old libstdc++ runtime for libc++<7.0") + #set(USE_STD_TLS OFF) + else() + set(LIBCXXABI_SO "${CMAKE_SYSROOT}/usr/lib/${TARGET_TRIPPLE}/libc++abi.so.1") #LIST_DIRECTORIES must be true (false by default for GLOB_RECURSE) + if(EXISTS ${LIBCXXABI_SO}) + execute_process( + COMMAND ${READELF} -symbols ${LIBCXXABI_SO} + OUTPUT_VARIABLE LIBCXXABI_SYMBOLS + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + string(REGEX MATCH "WEAK [A-Z ]* __cxa_thread_atexit_impl" WEAK__cxa_thread_atexit_impl "${LIBCXXABI_SYMBOLS}") + string(REGEX MATCH "GLOBAL [A-Z ]* __cxa_thread_atexit_impl" __cxa_thread_atexit_impl "${LIBCXXABI_SYMBOLS}") # UND __cxa_thread_atexit_impl@GLIBC_2.18 + if(NOT WEAK__cxa_thread_atexit_impl AND NOT __cxa_thread_atexit_impl) + message("libc++abi in build environment is too old to support thread_local on old libc runtime") + #set(USE_STD_TLS OFF) + endif() + endif() + endif() + endif() + set(LIBC_SO "${CMAKE_SYSROOT}/lib/${TARGET_TRIPPLE}/libc.so.6") + execute_process( + COMMAND ${READELF} -symbols ${LIBC_SO} + OUTPUT_VARIABLE LIBC_SYMBOLS + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + string(FIND "${LIBC_SYMBOLS}" __cxa_thread_atexit_impl HAS__cxa_thread_atexit_impl) + if(HAS__cxa_thread_atexit_impl EQUAL -1 AND NOT WEAK__cxa_thread_atexit_impl) # old libc + stdc++/libc++abi<4.0 + # libc++abi 4.0+ check use __cxa_thread_atexit_impl as weak symbol, and can fallback to libc++ own implementation + message(STATUS "libc in build environment is too old to support C++11 thread_local without libc++abi 4.0+") + set(USE_STD_TLS OFF) + endif() + #if(USE_STD_TLS AND NOT HAS__cxa_thread_atexit_impl EQUAL -1) # AND c++abi is none or libc++abi<4.0, then __cxa_thread_atexit generated by clang(for thread_local) can be replaced by __cxa_thread_atexit_impl + # link_libraries(-Wl,-defsym,__cxa_thread_atexit=__cxa_thread_atexit_impl) # libc++ abi is not libc++abi, e.g. stdc++/supc++ abi. clang generated __cxa_thread_atexit is defined in libc++abi 4.0+ + #endif() +else() # gcc files can be found by clang + if(NOT USE_STDCXX VERSION_LESS 4.8) + # Selected GCC installation: always the last (greatest version), no way to change it + add_compile_options(-nostdinc++) + #file(GLOB_RECURSE CXX_DIRS LIST_DIRECTORIES true "${CMAKE_SYSROOT}/usr/include/*c++") # c++ is dir, so LIST_DIRECTORIES must be true (false by default for GLOB_RECURSE) + add_compile_options("-cxx-isystem${CMAKE_SYSROOT}/usr/include/c++/${USE_STDCXX}") # no space after -cxx-isystem + add_compile_options("-cxx-isystem${CMAKE_SYSROOT}/usr/include/${TARGET_TRIPPLE}/c++/${USE_STDCXX}") # no space after -cxx-isystem + endif() +endif() + +if(CLANG_AS_LINKER) + link_libraries(-Wl,--build-id -fuse-ld=${LD_LLD}) # -s: strip + if(USE_COMPILER_RT) + link_libraries(-rtlib=compiler-rt) + endif() +else() + #set(CMAKE_LINER "${LD_LLD}" CACHE INTERNAL "linker" FORCE) + set(LINUX_LD_FLAGS "${LINUX_LD_FLAGS} --build-id --sysroot=${CMAKE_SYSROOT}") # -s: strip + macro(set_cc_clang lang) + set(CMAKE_${lang}_LINK_EXECUTABLE + " -flavor gnu -o ") + set(CMAKE_${lang}_CREATE_SHARED_LIBRARY + " -flavor gnu -o ") + set(CMAKE_${lang}_CREATE_SHARED_MODULE + " -flavor gnu -o ") + endmacro() + set_cc_clang(C) + set_cc_clang(CXX) +endif() +#53472, 5702912 +# Set or retrieve the cached flags. Without these compiler probing may fail! + +set(CMAKE_AR "${CMAKE_LLVM_AR}" CACHE INTERNAL "${CMAKE_SYSTEM_NAME} ar" FORCE) +set(CMAKE_OBJCOPY "${CMAKE_LLVM_OBJCOPY}" CACHE INTERNAL "${CMAKE_SYSTEM_NAME} objcopy" FORCE) +set(CMAKE_C_FLAGS "${LINUX_FLAGS}" CACHE INTERNAL "${CMAKE_SYSTEM_NAME} c compiler flags" FORCE) +set(CMAKE_CXX_FLAGS "${LINUX_FLAGS} ${LINUX_FLAGS_CXX}" CACHE INTERNAL "${CMAKE_SYSTEM_NAME} c++ compiler/linker flags" FORCE) +set(CMAKE_ASM_FLAGS "${LINUX_FLAGS}" CACHE INTERNAL "${CMAKE_SYSTEM_NAME} asm compiler flags" FORCE) +set(CMAKE_CXX_LINK_FLAGS "${LINUX_LINK_FLAGS_CXX}" CACHE INTERNAL "additional c++ link flags") +set(LD_LLD "${LD_LLD}" CACHE INTERNAL "${LD_LLD} as linker" FORCE) +# CMAKE_C_FLAGS_MINSIZEREL_INIT: will append -Os by cmake, which is not expected, and results in lto link error +set(CMAKE_C_FLAGS_MINSIZEREL "-Xclang -Oz -DNDEBUG") # -Xclang is required because c/c++ flags is passed to linker and not recognized by linker(-O1/2 is ok, -Os/z is not) +set(CMAKE_CXX_FLAGS_MINSIZEREL "-Xclang -Oz -DNDEBUG") + +set(CMAKE_BUILD_WITH_INSTALL_RPATH ON) \ No newline at end of file -- cgit v1.2.1 From 1da38f552e02d4ca2db4ead17c9454f66205727c Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Tue, 31 Aug 2021 13:01:52 +0700 Subject: enable builds only for clang --- .github/workflows/ci_ubuntu.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 85f3a97..578cfc3 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -27,12 +27,12 @@ jobs: cxx: "g++", cflags: "-msse2" } - # - { - # name: "Ubuntu x86 Clang", - # os: [self-hosted, linux, ARM64, aws], - # cc: "clang-12", - # cxx: "clang-cpp-12" - # } + - { + name: "Ubuntu x86 Clang", + os: [self-hosted, linux, ARM64, aws], + cc: "clang-12", + cxx: "clang-cpp-12" + } - { name: "Ubuntu Graviton GCC", os: [self-hosted, Linux, ARM64, graviton], @@ -102,6 +102,7 @@ jobs: 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}} @@ -114,12 +115,14 @@ jobs: 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 }} @@ -127,6 +130,7 @@ jobs: run: cmake --build ${{github.workspace}}/buildasan --config ${{env.BUILD_TYPE}} - name: Test ASAN + if: matrix.config.cc == "gcc" working-directory: ${{github.workspace}}/buildasan run: | export TMP=${{runner.temp}} -- cgit v1.2.1 From 55fd744ec64a49787baf4a7802931f4e25a993fc Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Tue, 31 Aug 2021 13:02:40 +0700 Subject: enable builds only for clang --- .github/workflows/ci_ubuntu.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 578cfc3..2b11a1d 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -130,7 +130,7 @@ jobs: run: cmake --build ${{github.workspace}}/buildasan --config ${{env.BUILD_TYPE}} - name: Test ASAN - if: matrix.config.cc == "gcc" + if: contains(matrix.config.cc, 'gcc') working-directory: ${{github.workspace}}/buildasan run: | export TMP=${{runner.temp}} @@ -146,7 +146,6 @@ jobs: make dist - 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 -- cgit v1.2.1 From edb01f4e4dc18ee9ca998bca72439e59916c6ac5 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Tue, 31 Aug 2021 13:06:04 +0700 Subject: fix graviton self hosted name CI --- .github/workflows/ci_ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 2b11a1d..dd57660 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -29,7 +29,7 @@ jobs: } - { name: "Ubuntu x86 Clang", - os: [self-hosted, linux, ARM64, aws], + os: [self-hosted Linux ARM64 graviton], cc: "clang-12", cxx: "clang-cpp-12" } -- cgit v1.2.1 From ece272d0dacaba10ced9224fde31be0c72aa84c9 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Tue, 31 Aug 2021 13:11:51 +0700 Subject: fix graviton self hosted name CI, take #2 --- .github/workflows/ci_ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index dd57660..36d60fc 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -29,7 +29,7 @@ jobs: } - { name: "Ubuntu x86 Clang", - os: [self-hosted Linux ARM64 graviton], + os: [self-hosted, Linux, ARM64, graviton], cc: "clang-12", cxx: "clang-cpp-12" } -- cgit v1.2.1 From c1f8a75f51984808424de2ea26a0be0ba2343d51 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Tue, 31 Aug 2021 13:20:03 +0700 Subject: split cmake configure between gcc and clang --- .github/workflows/ci_ubuntu.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 36d60fc..f15adb9 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -28,7 +28,7 @@ jobs: cflags: "-msse2" } - { - name: "Ubuntu x86 Clang", + name: "Ubuntu Graviton Clang", os: [self-hosted, Linux, ARM64, graviton], cc: "clang-12", cxx: "clang-cpp-12" @@ -84,7 +84,21 @@ jobs: echo $CXX echo $CFLAGS - - name: Configure CMake + - 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 -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=/home/pierre/projects/libgd/libgd_ghactions/cmake/modules/linux-clang.cmake + -DCMAKE_SYSTEM_PROCESSOR=armv7 + + - name: Configure CMake gcc + if: contains(matrix.config.cc, 'gcc') env: CC: ${{ matrix.config.cc }} CXX: ${{ matrix.config.cxx }} -- cgit v1.2.1 From 9dd319d30db5788962fd9c9c37396133d2228b9a Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Tue, 31 Aug 2021 13:22:20 +0700 Subject: add Intel CLang --- .github/workflows/ci_ubuntu.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index f15adb9..c1268c6 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -27,6 +27,12 @@ jobs: cxx: "g++", cflags: "-msse2" } + - { + name: "Ubuntu Intel Clang", + os: ubuntu-latest, + cc: "clang-12", + cxx: "clang-cpp-12" + } - { name: "Ubuntu Graviton Clang", os: [self-hosted, Linux, ARM64, graviton], @@ -95,7 +101,6 @@ jobs: -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=/home/pierre/projects/libgd/libgd_ghactions/cmake/modules/linux-clang.cmake - -DCMAKE_SYSTEM_PROCESSOR=armv7 - name: Configure CMake gcc if: contains(matrix.config.cc, 'gcc') -- cgit v1.2.1 From 8c222fe847fe70c5aa80a5ef0e1060c6acd4fbef Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Tue, 31 Aug 2021 14:22:45 +0700 Subject: fix toolchains path --- .github/workflows/ci_ubuntu.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index c1268c6..b8e6ad1 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -97,10 +97,10 @@ jobs: CXX: ${{ matrix.config.cxx }} CFLAGS: ${{ matrix.config.cflags }} run: - cmake -DENABLE_PNG=1 -DENABLE_FREETYPE=1 -DENABLE_JPEG=1 -DENABLE_WEBP=1 + 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=/home/pierre/projects/libgd/libgd_ghactions/cmake/modules/linux-clang.cmake + -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/cmake/modules/linux-clang.cmake - name: Configure CMake gcc if: contains(matrix.config.cc, 'gcc') -- cgit v1.2.1 From 306cdf5d7cbde9b1e813b852e632aa470076a1ba Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Tue, 31 Aug 2021 14:25:48 +0700 Subject: clang-12 pkg broken somehow on graviton, skip for now --- .github/workflows/ci_ubuntu.yml | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index b8e6ad1..fc1e4ed 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -33,12 +33,12 @@ jobs: cc: "clang-12", cxx: "clang-cpp-12" } - - { - name: "Ubuntu Graviton Clang", - os: [self-hosted, Linux, ARM64, graviton], - cc: "clang-12", - cxx: "clang-cpp-12" - } + #- { + # name: "Ubuntu Graviton Clang", + # os: [self-hosted, Linux, ARM64, graviton], + # cc: "clang-12", + # cxx: "clang-cpp-12" + # } - { name: "Ubuntu Graviton GCC", os: [self-hosted, Linux, ARM64, graviton], @@ -46,12 +46,7 @@ jobs: cxx: "g++", cflags: "-march=armv8.2-a+fp16+rcpc+dotprod+crypto+sve -mtune=neoverse-n1" } - # - { - # name: "Ubuntu Graviton Clang", - # os: [self-hosted, Linux, ARM64, graviton], - # cc: "clang-12", - # cxx: "clang-cpp-12" - # } + name: ${{ matrix.config.name }} defaults: run: @@ -71,7 +66,7 @@ jobs: sudo add-apt-repository ppa:strukturag/libde265 sudo add-apt-repository ppa:strukturag/libheif - - name: install Ubuntu dependencies + - name: install dependencies env: DEBIAN_FRONTEND: noninteractive run: sudo -E apt-get install --fix-missing -qq -o Acquire::Retries=3 @@ -90,7 +85,7 @@ jobs: echo $CXX echo $CFLAGS - - name: Configure CMake Clang + - name: Configure CMake Clang if: contains(matrix.config.cc, 'clang') env: CC: ${{ matrix.config.cc }} -- cgit v1.2.1 From 998eb8c9db2d97e1c5ab9e50025d18883f0aea59 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Tue, 31 Aug 2021 14:29:56 +0700 Subject: let see if that fix that damned yaml --- .github/workflows/ci_ubuntu.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index fc1e4ed..a40c078 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -33,12 +33,6 @@ jobs: cc: "clang-12", cxx: "clang-cpp-12" } - #- { - # name: "Ubuntu Graviton Clang", - # os: [self-hosted, Linux, ARM64, graviton], - # cc: "clang-12", - # cxx: "clang-cpp-12" - # } - { name: "Ubuntu Graviton GCC", os: [self-hosted, Linux, ARM64, graviton], @@ -47,6 +41,14 @@ jobs: cflags: "-march=armv8.2-a+fp16+rcpc+dotprod+crypto+sve -mtune=neoverse-n1" } +# - { +# name: "Ubuntu Graviton Clang", +# os: [self-hosted, Linux, ARM64, graviton], +# cc: "clang-12", +# cxx: "clang-cpp-12" +# } + + name: ${{ matrix.config.name }} defaults: run: -- cgit v1.2.1 From 15d6fb79a33157cc730d3519f3680c8491ac4e82 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Tue, 31 Aug 2021 14:34:52 +0700 Subject: whoever thought inventing a language in yaml needs a life... --- .github/workflows/ci_ubuntu.yml | 164 +++++++++++++++++++--------------------- 1 file changed, 78 insertions(+), 86 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index a40c078..1f45d3e 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -41,14 +41,6 @@ jobs: cflags: "-march=armv8.2-a+fp16+rcpc+dotprod+crypto+sve -mtune=neoverse-n1" } -# - { -# name: "Ubuntu Graviton Clang", -# os: [self-hosted, Linux, ARM64, graviton], -# cc: "clang-12", -# cxx: "clang-cpp-12" -# } - - name: ${{ matrix.config.name }} defaults: run: @@ -87,82 +79,82 @@ jobs: echo $CXX echo $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 + - 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 + fi -- cgit v1.2.1 From 2a5e7b7bb61ffed7c2310c0b8281bc8f7e5e5ba8 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Tue, 31 Aug 2021 14:36:29 +0700 Subject: whoever thought inventing a language in yaml needs a life...#2 --- .github/workflows/ci_ubuntu.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 1f45d3e..77f3306 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -75,9 +75,9 @@ jobs: CXX: ${{ matrix.config.cxx }} CFLAGS: ${{ matrix.config.cflags }} run: | - echo $CC - echo $CXX - echo $CFLAGS + echo ${{ matrix.config.cc }} + echo ${{ matrix.config.cxx }} + echo ${{ matrix.config.cflags }} - name: Configure CMake Clang if: contains(matrix.config.cc, 'clang') -- cgit v1.2.1 From fe566abd2946c465a97b97d76257769501182fdf Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Tue, 31 Aug 2021 14:40:02 +0700 Subject: whoever thought inventing a language in yaml needs a life...#3 --- .github/workflows/ci_ubuntu.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 77f3306..2a48b89 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -69,16 +69,6 @@ jobs: 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: @@ -86,7 +76,7 @@ jobs: 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 + 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 -- cgit v1.2.1 From f06ab9e088b3ca62c02d7f727f247da1bee58a8d Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Tue, 31 Aug 2021 14:41:31 +0700 Subject: whoever thought inventing a language in yaml needs a life...#4 --- .github/workflows/ci_ubuntu.yml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 2a48b89..6bce342 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -63,11 +63,22 @@ jobs: - 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 + 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') -- cgit v1.2.1 From 88c36f25ec0c75cb570ebd5fac43afe5bd87ef9d Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Tue, 31 Aug 2021 14:42:45 +0700 Subject: whoever thought inventing a language in yaml needs a life...#5 --- .github/workflows/ci_ubuntu.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 6bce342..c308c1e 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -86,7 +86,7 @@ jobs: CC: ${{ matrix.config.cc }} CXX: ${{ matrix.config.cxx }} CFLAGS: ${{ matrix.config.cflags }} - run: + 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}} @@ -98,7 +98,7 @@ jobs: CC: ${{ matrix.config.cc }} CXX: ${{ matrix.config.cxx }} CFLAGS: ${{ matrix.config.cflags }} - run: + 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}} @@ -125,7 +125,7 @@ jobs: CXX: ${{ matrix.config.cxx }} CFLAGS: ${{ matrix.config.cflags }} if: contains(matrix.config.cc, 'gcc') - run: + 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}} -- cgit v1.2.1 From aa887967f598062ee6af3c047c226258536159f8 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Tue, 31 Aug 2021 14:47:13 +0700 Subject: whoever thought inventing a language in yaml needs a life...#6 pls kill me --- .github/workflows/ci_ubuntu.yml | 158 ++++++++++++++++++++-------------------- 1 file changed, 79 insertions(+), 79 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index c308c1e..37a36cc 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -80,82 +80,82 @@ jobs: 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 + - 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 -- cgit v1.2.1 From 91d1669c7dd46c050698d11e4f187cacc20e5165 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Tue, 31 Aug 2021 14:51:24 +0700 Subject: whoever thought inventing a language in yaml needs a life...#7 --- .github/workflows/ci_ubuntu.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 37a36cc..073fc36 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -63,12 +63,7 @@ jobs: - 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 + 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: -- cgit v1.2.1 From 3ec453691e22592077a9c7157306d90bda013430 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Tue, 31 Aug 2021 14:52:25 +0700 Subject: whoever thought inventing a language in yaml needs a life...8 --- .github/workflows/ci_ubuntu.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index 073fc36..9e0abdb 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -81,7 +81,7 @@ jobs: CC: ${{ matrix.config.cc }} CXX: ${{ matrix.config.cxx }} CFLAGS: ${{ matrix.config.cflags }} - run: | + 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}} @@ -93,7 +93,7 @@ jobs: CC: ${{ matrix.config.cc }} CXX: ${{ matrix.config.cxx }} CFLAGS: ${{ matrix.config.cflags }} - run: | + 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}} @@ -120,7 +120,7 @@ jobs: CXX: ${{ matrix.config.cxx }} CFLAGS: ${{ matrix.config.cflags }} if: contains(matrix.config.cc, 'gcc') - run: | + 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}} -- cgit v1.2.1 From 6c494b5da30c54de2e115a96dcaaf5c6792ad88b Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Wed, 1 Sep 2021 08:34:50 +0700 Subject: rename to _mingw --- .github/workflows/ci_windows_mingw.yml | 79 ++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 .github/workflows/ci_windows_mingw.yml 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}} -- cgit v1.2.1 From 6831b404f34c89b5d7b4a878507edc27b0136cad Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Wed, 1 Sep 2021 08:36:07 +0700 Subject: mv --- .github/workflows/ci_master_mingw.yml | 79 ----------------------------------- 1 file changed, 79 deletions(-) delete mode 100644 .github/workflows/ci_master_mingw.yml diff --git a/.github/workflows/ci_master_mingw.yml b/.github/workflows/ci_master_mingw.yml deleted file mode 100644 index 0e41b5b..0000000 --- a/.github/workflows/ci_master_mingw.yml +++ /dev/null @@ -1,79 +0,0 @@ -name: CI - -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}} -- cgit v1.2.1 From cbdcd95f214ea0720c9fd379cc4c521d53baa999 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Wed, 1 Sep 2021 08:40:13 +0700 Subject: basic docs about CI --- docs/README_CI.md | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 docs/README_CI.md diff --git a/docs/README_CI.md b/docs/README_CI.md new file mode 100644 index 0000000..efb026b --- /dev/null +++ b/docs/README_CI.md @@ -0,0 +1,66 @@ +# LibGD CI + +LibGD uses github actions for CI. + +The platforms used are: +- Ubuntu 20.04LTS, Intel + - https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md + - GCC (x64) + - CLang (x64) +- Ubuntu 20.04LTS, ARM (graviton2) + - AWS Ubuntu Image + - GCC (64bit) + - CLang (64bit) +- Windows Server 2019, x64 + - https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md + - Visual Studio Enterprise 2019 (x64, x86 and arm64 cross compiliations) + - MingW GCC (x86, x64 and ucrt64) +- MacOS 11, Intel + - https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11-Readme.md + - GCC x64 +- MacOS 11, M1 in place but we don't manage to get M1 runners + +The CI configurations and script can be found in + +``` +.gihub/workflows +``` + +## Where are they used + +The actions work on: +- master push +- any new pull requests +- GD3 (branch surface/surface) + +Please do not merge pull requests can be merged if any of the CI failed. + +## ci_ubuntu + +This file contains all Linux/Ubuntu configurations. The dependencies are installed using apt. Some libraries may use non official Ubuntu repositories to get the latest versions. + +## ci_windows.yml + +It contains all jobs and matrices for VS builds (cross compilations included). + +Dependencies are installed using archived VCPKG libraries, from: + +https://github.com/libgd/libgd-windows-vcpkg-prebuild + +For x64, x86 and arm64. + +## ci_windows.yml + +## ci_macos.yml + +All configs for MacOS. Dependencies are installed using homebrew (for those not available already in the image). + +Important note: + +Github actions MacOS images contain Mono. Mono somehow messes up with the various paths and it is not worth figuring out how to work around it. We use a script to simply remove Mono from the system, the script can be found in .github\scripts\removemono.sh + +## shellcheck.yml + +CI to valid shell scripts syntax, portability or other possible issues. It uses https://www.shellcheck.net/. + +If a script is needed with some shell specific features which are raised as error by shellcheck, please use the ignore rules in the top of the script or at the required line(s). For an example, removemono.sh contains such rules. \ No newline at end of file -- cgit v1.2.1