diff --git a/.github/workflows/solaris.yml b/.github/workflows/solaris.yml new file mode 100644 index 00000000000..b1adfcbed6c --- /dev/null +++ b/.github/workflows/solaris.yml @@ -0,0 +1,55 @@ +name: Run Solaris tests + +# This test runs within a Solaris VM. +# It is very slow. +# Consequently, we only want to run it on demand. +# The trigger is the feature branch name. + +on: + push: + branches: + - '*sun*' + - '*Sun*' + - '*solaris*' + - '*Solaris*' + +jobs: + test: + runs-on: ubuntu-latest + name: solaris-vm test + env: + EX_TOKEN: "ex_value" + steps: + - uses: actions/checkout@v4 + - name: Test in Solaris + id: test + uses: vmactions/solaris-vm@v1.0.1 + with: + envs: 'EX_TOKEN' + usesh: true + prepare: | + pkgutil -y -i socat + release: "11.4-gcc" + run: | + if [ -n "test" ]; then + echo "false" + fi + if [ "test" ]; then + echo "test" + fi + pwd + ls -lah + whoami + env + psrinfo -vp + cat /etc/release + psrinfo -v + echo "::memstat" | mdb -k + gcc -v + CC=gcc CFLAGS="-Werror -O1" gmake -j check + pkg install cmake + cmake --version + rm -rf cmakebuild install + mkdir -p cmakebuild install + cd cmakebuild; cmake -Wdev -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-Werror -O0" -DCMAKE_INSTALL_PREFIX=install ../build/cmake; cd .. + cmake --build cmakebuild --target install -- -j V=1 diff --git a/build/cmake/CMakeLists.txt b/build/cmake/CMakeLists.txt index 023b998f556..155f3112d7b 100644 --- a/build/cmake/CMakeLists.txt +++ b/build/cmake/CMakeLists.txt @@ -34,7 +34,6 @@ project(zstd VERSION "${zstd_VERSION_MAJOR}.${zstd_VERSION_MINOR}.${zstd_VERSION_PATCH}" LANGUAGES C # Main library is in C ASM # And ASM - CXX # Testing contributed code also utilizes CXX ) message(STATUS "ZSTD VERSION: ${zstd_VERSION}") diff --git a/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake b/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake index 5f179989b68..5a0fd8199d2 100644 --- a/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake +++ b/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake @@ -51,7 +51,7 @@ function(EnableCompilerFlag _flag _C _CXX _LD) endfunction() macro(ADD_ZSTD_COMPILATION_FLAGS) - if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang" OR MINGW) #Not only UNIX but also WIN32 for MinGW + if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang" OR MINGW) # Not only UNIX but also WIN32 for MinGW # It's possible to select the exact standard used for compilation. # It's not necessary, but can be employed for specific purposes. # Note that zstd source code is compatible with both C++98 and above diff --git a/build/cmake/contrib/CMakeLists.txt b/build/cmake/contrib/CMakeLists.txt index 8df2a17b3a8..48201f770a5 100644 --- a/build/cmake/contrib/CMakeLists.txt +++ b/build/cmake/contrib/CMakeLists.txt @@ -7,7 +7,11 @@ # in the COPYING file in the root directory of this source tree). # ################################################################ -project(contrib) +project(contrib + LANGUAGES C # Main library is in C + ASM # And ASM + CXX # pzstd, gen_html +) add_subdirectory(pzstd) add_subdirectory(gen_html)