diff options
-rw-r--r-- | .github/workflows/ci_gcc14.yml | 76 | ||||
-rw-r--r-- | testament/lib/stdtest/testutils.nim | 5 | ||||
-rw-r--r-- | tests/misc/trunner_special.nim | 7 | ||||
-rw-r--r-- | tests/stdlib/thttpclient_ssl.nim | 5 | ||||
-rw-r--r-- | tests/vm/tvmmisc.nim | 2 |
5 files changed, 92 insertions, 3 deletions
diff --git a/.github/workflows/ci_gcc14.yml b/.github/workflows/ci_gcc14.yml new file mode 100644 index 000000000..fb286887a --- /dev/null +++ b/.github/workflows/ci_gcc14.yml @@ -0,0 +1,76 @@ +name: GCC 14 +on: + pull_request: + push: + branches: + - 'devel' + + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: [ubuntu-24.04] + cpu: [amd64] + name: '${{ matrix.os }}' + runs-on: ${{ matrix.os }} + timeout-minutes: 60 # refs bug #18178 + steps: + - name: 'Checkout' + uses: actions/checkout@v4 + with: + fetch-depth: 2 + + - name: 'Install node.js 20.x' + uses: actions/setup-node@v4 + with: + node-version: '20.x' + + - name: 'Install dependencies (Linux amd64)' + if: runner.os == 'Linux' && matrix.cpu == 'amd64' + run: | + sudo apt update -qq + sudo apt remove needrestart + DEBIAN_FRONTEND='noninteractive' \ + sudo apt install --no-install-recommends -yq \ + libcurl4-openssl-dev libgc-dev libsdl1.2-dev libsfml-dev \ + valgrind libc6-dbg libblas-dev xorg-dev + - name: 'Install dependencies (Linux amd64 gcc 14)' + if: runner.os == 'Linux' && matrix.cpu == 'amd64' + run: | + sudo add-apt-repository universe + sudo apt update -qq + sudo apt install -y gcc-14 g++-14 libpcre3 liblapack-dev + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 60 --slave /usr/bin/g++ g++ /usr/bin/g++-14 + - name: 'Install dependencies (macOS)' + if: runner.os == 'macOS' + run: brew install boehmgc make sfml gtk+3 + - name: 'Install dependencies (Windows)' + if: runner.os == 'Windows' + shell: bash + run: | + set -e + . ci/funs.sh + nimInternalInstallDepsWindows + echo_run echo "${{ github.workspace }}/dist/mingw64/bin" >> "${GITHUB_PATH}" + + - name: 'Add build binaries to PATH' + shell: bash + run: echo "${{ github.workspace }}/bin" >> "${GITHUB_PATH}" + + - name: 'NIM_TESTAMENT_DISABLE_SSL' + shell: bash + run: echo "NIM_TESTAMENT_DISABLE_SSL=1" >> $GITHUB_ENV + + - name: 'System information' + shell: bash + run: . ci/funs.sh && nimCiSystemInfo + + - name: 'Build csourcesAny' + shell: bash + run: . ci/funs.sh && nimBuildCsourcesIfNeeded CC=gcc ucpu='${{ matrix.cpu }}' + + - name: 'koch, Run CI' + shell: bash + run: . ci/funs.sh && nimInternalBuildKochAndRunCI diff --git a/testament/lib/stdtest/testutils.nim b/testament/lib/stdtest/testutils.nim index 66afd62af..a490b17c8 100644 --- a/testament/lib/stdtest/testutils.nim +++ b/testament/lib/stdtest/testutils.nim @@ -66,6 +66,11 @@ template enableRemoteNetworking*: bool = ## a `nim` invocation (possibly via additional intermediate processes). getEnv("NIM_TESTAMENT_REMOTE_NETWORKING") == "1" +template disableSSLTesting*: bool = + ## TODO: workaround for GitHub Action gcc 14 matrix; remove this + ## matrix and the flag after Azure agent supports ubuntu 24.04 + getEnv("NIM_TESTAMENT_DISABLE_SSL") == "1" + template whenRuntimeJs*(bodyIf, bodyElse) = ##[ Behaves as `when defined(js) and not nimvm` (which isn't legal yet). diff --git a/tests/misc/trunner_special.nim b/tests/misc/trunner_special.nim index e13810722..e08b419b0 100644 --- a/tests/misc/trunner_special.nim +++ b/tests/misc/trunner_special.nim @@ -14,6 +14,10 @@ xxx test all tests/untestable/* here, possibly with adjustments to make running import std/[strformat,os,unittest,compilesettings] import stdtest/specialpaths + +from stdtest/testutils import disableSSLTesting + + const nim = getCurrentCompilerExe() mode = querySetting(backend) @@ -29,4 +33,5 @@ proc main = block: # SSL certificate check integration tests runCmd fmt"{nim} r {options} -d:ssl --threads:on --mm:refc {testsDir}/untestable/thttpclient_ssl_remotenetwork.nim" -main() +when not disableSSLTesting(): + main() diff --git a/tests/stdlib/thttpclient_ssl.nim b/tests/stdlib/thttpclient_ssl.nim index feacd3e57..6b963f029 100644 --- a/tests/stdlib/thttpclient_ssl.nim +++ b/tests/stdlib/thttpclient_ssl.nim @@ -13,7 +13,10 @@ discard """ ## Test with: ## ./bin/nim c -d:ssl -p:. --threads:on -r tests/stdlib/thttpclient_ssl.nim -when not defined(windows): + +from stdtest/testutils import disableSSLTesting + +when not defined(windows) and not disableSSLTesting(): # Disabled on Windows due to old OpenSSL version import std/[formatfloat, syncio] import diff --git a/tests/vm/tvmmisc.nim b/tests/vm/tvmmisc.nim index 3c4b47c48..71c52443c 100644 --- a/tests/vm/tvmmisc.nim +++ b/tests/vm/tvmmisc.nim @@ -355,7 +355,7 @@ block: # bug #8007 block: # bug #14340 block: proc opl3EnvelopeCalcSin0() = discard - type EnvelopeSinfunc = proc() + type EnvelopeSinfunc = proc() {.nimcall.} # todo: fixme # const EnvelopeCalcSin0 = opl3EnvelopeCalcSin0 # ok const EnvelopeCalcSin0: EnvelopeSinfunc = opl3EnvelopeCalcSin0 # was bug const envelopeSin = [EnvelopeCalcSin0] |