From 3e12ccb3e196d8d433cf12aa0ed9d25fd3bd6566 Mon Sep 17 00:00:00 2001 From: zaikunzhang Date: Wed, 1 May 2024 21:56:01 +0800 Subject: [PATCH] 240501.215601.HKT remove the env variables in the matrix of cmake.yml, as they are not supported as of today --- .github/workflows/cmake.yml | 60 ++++++++++++++----------------------- 1 file changed, 23 insertions(+), 37 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index e464e35430..a9e138717d 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -21,20 +21,6 @@ on: run-name: ${{ github.event_name == 'workflow_dispatch' && format('Manual run {0} , {1}, {2}', inputs.git-ref, inputs.stress-test, inputs.verbose-makefile) || '' }} -env: - GCC_FLAGS: '-Wall -Wextra -Wpedantic -Werror' - GFORTRAN_FLAGS: '-Wall -Wextra -Wpedantic -Werror -fimplicit-none -fcheck=all -fstack-check -Wno-function-elimination' - ICC_FLAGS: '-diag-disable=10441 -Wall -w3 -Werror-all' - IFORT_FLAGS: '-warn all -debug extended -fimplicit-none -standard-semantics' - ICX_FLAGS: '-Wall -Werror' - IFX_FLAGS: '-warn all -debug extended -fimplicit-none -standard-semantics' - ICC_FLAGS_WIN: '-Qdiag-disable:10441 -Wall -W5 -Werror-all' - IFORT_FLAGS_WIN: '/warn:all /debug:extended /Z7 /fimplicit-none /standard-semantics' - ICX_FLAGS_WIN: '-Wall -Werror' - IFX_FLAGS_WIN: '/warn:all /debug:extended /Z7 /fimplicit-none /standard-semantics' - CL_FLAGS: '-Wall -W4 -WX' - - permissions: contents: read @@ -54,12 +40,12 @@ jobs: # First define the toolchains on Linux and macOS. os: [ubuntu-latest, macos-12, macos-13] toolchain: - - {compiler: gcc, version: 11, cflags: "${{ env.GCC_FLAGS }}", fflags: "${{ env.GFORTRAN_FLAGS }}"} - - {compiler: gcc, version: 12, cflags: "${{ env.GCC_FLAGS }}", fflags: "${{ env.GFORTRAN_FLAGS }}"} - - {compiler: gcc, version: 13, cflags: "${{ env.GCC_FLAGS }}", fflags: "${{ env.GFORTRAN_FLAGS }}"} - - {compiler: intel-classic, version: '2021.8', cflags: "${{ env.ICC_FLAGS }", fflags: "${{ env.IFORT_FLAGS }"} - - {compiler: intel-classic, version: '2021.9', cflags: "${{ env.ICC_FLAGS }", fflags: "${{ env.IFORT_FLAGS }"} - - {compiler: intel-classic, version: '2021.10', cflags: "${{ env.ICC_FLAGS }", fflags: "${{ env.IFORT_FLAGS }"} + - {compiler: gcc, version: 11, cflags: '-Wall -Wextra -Wpedantic -Werror', fflags: '-Wall -Wextra -Wpedantic -Werror -fimplicit-none -fcheck=all -fstack-check -Wno-function-elimination'} + - {compiler: gcc, version: 12, cflags: '-Wall -Wextra -Wpedantic -Werror', fflags: '-Wall -Wextra -Wpedantic -Werror -fimplicit-none -fcheck=all -fstack-check -Wno-function-elimination'} + - {compiler: gcc, version: 13, cflags: '-Wall -Wextra -Wpedantic -Werror', fflags: '-Wall -Wextra -Wpedantic -Werror -fimplicit-none -fcheck=all -fstack-check -Wno-function-elimination'} + - {compiler: intel-classic, version: '2021.8', cflags: '-diag-disable=10441 -Wall -w3 -Werror-all', fflags: '-warn all -debug extended -fimplicit-none -standard-semantics'} + - {compiler: intel-classic, version: '2021.9', cflags: '-diag-disable=10441 -Wall -w3 -Werror-all', fflags: '-warn all -debug extended -fimplicit-none -standard-semantics'} + - {compiler: intel-classic, version: '2021.10', cflags: '-diag-disable=10441 -Wall -w3 -Werror-all', fflags: '-warn all -debug extended -fimplicit-none -standard-semantics'} include: # intel compiler (ifx) does not support macOS. So they are not included above but below. @@ -68,19 +54,19 @@ jobs: # compiler, but the (new) intel c compiler does not recognize '-W3 -Werror-all', even though the # official documentation of the compiler mentions them. Why? - os: ubuntu-latest - toolchain: {compiler: intel, version: '2023.2', cflags: "${{ env.ICX_FLAGS }", fflags: "${{ env.IFX_FLAGS }"} + toolchain: {compiler: intel, version: '2023.2', cflags: '-Wall -Werror', fflags: '-warn all -debug extended -fimplicit-none -standard-semantics'} - os: ubuntu-latest - toolchain: {compiler: intel, version: '2024.0', cflags: "${{ env.ICX_FLAGS }", fflags: "${{ env.IFX_FLAGS }"} + toolchain: {compiler: intel, version: '2024.0', cflags: '-Wall -Werror', fflags: '-warn all -debug extended -fimplicit-none -standard-semantics'} - os: ubuntu-latest - toolchain: {compiler: intel, version: '2024.1', cflags: "${{ env.ICX_FLAGS }", fflags: "${{ env.IFX_FLAGS }"} + toolchain: {compiler: intel, version: '2024.1', cflags: '-Wall -Werror', fflags: '-warn all -debug extended -fimplicit-none -standard-semantics'} # What follows contains the toolchains for Windows, including gcc, intel classic, and intel. - os: windows-latest - toolchain: {compiler: gcc, version: 11, cflags: "${{ env.GCC_FLAGS }}", fflags: "${{ env.GFORTRAN_FLAGS }}"} + toolchain: {compiler: gcc, version: 11, cflags: '-Wall -Wextra -Wpedantic -Werror', fflags: '-Wall -Wextra -Wpedantic -Werror -fimplicit-none -fcheck=all -fstack-check -Wno-function-elimination'} - os: windows-latest - toolchain: {compiler: gcc, version: 12, cflags: "${{ env.GCC_FLAGS }}", fflags: "${{ env.GFORTRAN_FLAGS }}"} + toolchain: {compiler: gcc, version: 12, cflags: '-Wall -Wextra -Wpedantic -Werror', fflags: '-Wall -Wextra -Wpedantic -Werror -fimplicit-none -fcheck=all -fstack-check -Wno-function-elimination'} - os: windows-latest - toolchain: {compiler: gcc, version: 13, cflags: "${{ env.GCC_FLAGS }}", fflags: "${{ env.GFORTRAN_FLAGS }}"} + toolchain: {compiler: gcc, version: 13, cflags: '-Wall -Wextra -Wpedantic -Werror', fflags: '-Wall -Wextra -Wpedantic -Werror -fimplicit-none -fcheck=all -fstack-check -Wno-function-elimination'} # Zaikun 20240423: # 1. On windows-latest, the cflags will not be recognized correctly if we start them with `/` instead # of `-`, even though the former aligns with the official documentation of the compilers. Why? @@ -88,21 +74,21 @@ jobs: # compiler, but the (new) intel c compiler does not recognize '-W5 -Werror-all', even though the # official documentation of the compiler mentions them. Why? - os: windows-latest - toolchain: {compiler: intel, version: '2023.2', cflags: "${{ env.ICX_FLAGS_WIN }", fflags: "${{ env.IFX_FLAGS_WIN }"} + toolchain: {compiler: intel, version: '2023.2', cflags: '-Wall -Werror', fflags: '/warn:all /debug:extended /Z7 /fimplicit-none /standard-semantics'} - os: windows-latest - toolchain: {compiler: intel, version: '2024.0', cflags: "${{ env.ICX_FLAGS_WIN }", fflags: "${{ env.IFX_FLAGS_WIN }"} + toolchain: {compiler: intel, version: '2024.0', cflags: '-Wall -Werror', fflags: '/warn:all /debug:extended /Z7 /fimplicit-none /standard-semantics'} - os: windows-latest - toolchain: {compiler: intel, version: '2024.1', cflags: "${{ env.ICX_FLAGS_WIN }", fflags: "${{ env.IFX_FLAGS_WIN }"} + toolchain: {compiler: intel, version: '2024.1', cflags: '-Wall -Werror', fflags: '/warn:all /debug:extended /Z7 /fimplicit-none /standard-semantics'} - os: windows-latest - toolchain: {compiler: intel, version: '2024.1', cflags: "${{ env.CL_FLAGS }", fflags: "${{ env.IFX_FLAGS_WIN }", cc: cl} + toolchain: {compiler: intel, version: '2024.1', cflags: '-Wall -W4 -WX', fflags: '/warn:all /debug:extended /Z7 /fimplicit-none /standard-semantics', cc: cl} # N.B.: As of 20240401, setup-fortran fails constantly with windows-latest and intel-classic # 2021.8. Thus this combination is not included. - os: windows-latest - toolchain: {compiler: intel-classic, version: '2021.9', cflags: "${{ env.ICC_FLAGS_WIN }", fflags: "${{ env.IFORT_FLAGS_WIN }"} + toolchain: {compiler: intel-classic, version: '2021.9', cflags: '-Qdiag-disable:10441 -Wall -W5 -Werror-all', fflags: '/warn:all /debug:extended /Z7 /fimplicit-none /standard-semantics'} - os: windows-latest - toolchain: {compiler: intel-classic, version: '2021.10', cflags: "${{ env.ICC_FLAGS_WIN }", fflags: "${{ env.IFORT_FLAGS_WIN }"} + toolchain: {compiler: intel-classic, version: '2021.10', cflags: '-Qdiag-disable:10441 -Wall -W5 -Werror-all', fflags: '/warn:all /debug:extended /Z7 /fimplicit-none /standard-semantics'} - os: windows-latest - toolchain: {compiler: intel-classic, version: '2021.10', cflags: "${{ env.CL_FLAGS }", fflags: "${{ env.IFORT_FLAGS_WIN }", cc: cl} + toolchain: {compiler: intel-classic, version: '2021.10', cflags: '-Wall -W4 -WX', fflags: '/warn:all /debug:extended /Z7 /fimplicit-none /standard-semantics', cc: cl} steps: @@ -193,9 +179,9 @@ jobs: toolchain: # Classic Flang family with -Mchkptr would fail. See https://forums.developer.nvidia.com/t/bug-in-nvfortran-with-mchkptr-for-unallocated-optional-arguments/223220 # As of 20240220, aflang with -Mbounds would fail due to the bug at https://github.com/flang-compiler/flang/issues/1238 - - {compiler: nvfortran, cflags: "${{ env.GCC_FLAGS }}", fflags: '-C -Wall -Wextra -Minform=warn -Mstandard -Mbounds -Mchkstk'} - - {compiler: flang, cflags: "${{ env.GCC_FLAGS }}", fflags: '-std=f2018 -pedantic -fimplicit-none -Werror'} - - {compiler: aflang, cflags: "${{ env.GCC_FLAGS }}", fflags: '-pedantic -Weverything -Wall -Wextra -Minform=warn -Mstandard'} + - {compiler: nvfortran, cflags: '-Wall -Wextra -Wpedantic -Werror', fflags: '-C -Wall -Wextra -Minform=warn -Mstandard -Mbounds -Mchkstk'} + - {compiler: flang, cflags: '-Wall -Wextra -Wpedantic -Werror', fflags: '-std=f2018 -pedantic -fimplicit-none -Werror'} + - {compiler: aflang, cflags: '-Wall -Wextra -Wpedantic -Werror', fflags: '-pedantic -Weverything -Wall -Wextra -Minform=warn -Mstandard'} steps: @@ -237,7 +223,7 @@ jobs: cmake --version VERBOSE_MAKEFILE=OFF - if [[ "${{ github.event.inputs.verbose-makefile }}" == "true" ]] ; then + if [[ ${{ github.event.inputs.verbose-makefile }} == 'true' ]] ; then VERBOSE_MAKEFILE=ON fi