Repository navigation
CI: Factorization and misc improvements #5
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Smoke Test | |
| run-name: ${{ inputs.run_name && 'Manual:' }} ${{ inputs.run_name }} | |
| on: | |
| push: | |
| paths-ignore: &paths_ignore | |
| - 'docs/**' | |
| - 'share/**' | |
| - 'utils/cmake/**' | |
| - 'utils/config/**' | |
| - 'utils/valgrind/**' | |
| - '**.txt' | |
| - '**.md' | |
| pull_request: | |
| paths-ignore: *paths_ignore | |
| workflow_dispatch: | |
| inputs: | |
| run_name: | |
| description: 'Descriptive name for this run' | |
| type: string | |
| required: false | |
| configure_args: | |
| description: 'Additional configure arguments' | |
| type: string | |
| required: false | |
| env_vars: | |
| description: 'Environment variable settings' | |
| type: string | |
| default: 'GASNET_STATSFILE=- GASNET_MALLOC_INIT=1' | |
| required: false | |
| concurrency: | |
| # De-duplicate concurrent workflow runs on the same branch/ref | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}-${{ ( github.event_name == 'workflow_dispatch' && github.run_id ) || 'auto' }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/master' && github.ref != 'refs/heads/develop' }} | |
| jobs: | |
| build: | |
| name: ${{ matrix.compiler }}-${{ matrix.version }} (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash --noprofile --norc -e -x -o pipefail {0} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ macos-14, macos-15, macos-15-intel, macos-26, macos-26-intel, ubuntu-24.04 ] | |
| compiler: [ gcc ] | |
| version: [ 12, 13, 14, 15 ] | |
| extra_flags: [ -g ] | |
| include: | |
| - os: ubuntu-22.04 | |
| compiler: gcc | |
| version: 12 # no package available for gcc 13+ | |
| # --- LLVM clang coverage --- | |
| - os: macos-14 | |
| compiler: clang | |
| version: 22 | |
| - os: macos-15 | |
| compiler: clang | |
| version: 22 | |
| - os: macos-15-intel | |
| compiler: clang | |
| version: 22 | |
| - os: macos-26 | |
| compiler: clang | |
| version: 22 | |
| - os: macos-26-intel | |
| compiler: clang | |
| version: 22 | |
| # https://hub.docker.com/r/phhargrove/llvm-flang/tags | |
| - os: ubuntu-24.04 | |
| compiler: clang | |
| version: 22 | |
| container: phhargrove/llvm-flang:22.1.0-latest | |
| - os: ubuntu-24.04 | |
| compiler: clang | |
| version: 21 | |
| container: phhargrove/llvm-flang:21.1.0-latest | |
| - os: ubuntu-24.04 | |
| compiler: clang | |
| version: 20 | |
| container: phhargrove/llvm-flang:20.1.0-latest | |
| - os: ubuntu-24.04 | |
| compiler: clang | |
| version: 19 | |
| extra_flags: -g -mmlir -allow-assumed-rank | |
| container: phhargrove/llvm-flang:19.1.1-latest | |
| # --- Intel coverage --- | |
| # https://hub.docker.com/r/intel/oneapi-hpckit/tags | |
| - os: ubuntu-24.04 | |
| compiler: icx | |
| version: latest | |
| container: intel/oneapi-hpckit:latest | |
| - os: ubuntu-24.04 | |
| compiler: icx | |
| version: 2025.2.0 | |
| container: intel/oneapi-hpckit:2025.2.0-0-devel-ubuntu24.04 | |
| - os: ubuntu-24.04 | |
| compiler: icx | |
| version: 2025.1.0 | |
| container: intel/oneapi-hpckit:2025.1.0-0-devel-ubuntu24.04 | |
| - os: ubuntu-22.04 | |
| compiler: icx | |
| version: 2025.0.0 | |
| container: intel/oneapi-hpckit:2025.0.0-0-devel-ubuntu22.04 | |
| container: | |
| image: ${{ matrix.container }} | |
| env: | |
| COMPILER_VERSION: ${{ matrix.version }} | |
| CC: ${{ matrix.compiler }} | |
| CFLAGS: ${{ matrix.extra_flags }} | |
| CONFIGURE_ARGS: --disable-mpi-compat --enable-rpath ${{ inputs.configure_args }} | |
| GASNET_BACKTRACE: 1 | |
| GASNET_SPAWN_VERBOSE: 1 | |
| GASNET_SPAWNFN: L | |
| GASNET_MASTERIP: 127.0.0.1 | |
| UPCXX_VERBOSE: 1 | |
| RANKS: 4 | |
| MAKE_FLAGS: -j 4 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Install Ubuntu Native Dependencies | |
| if: ${{ contains(matrix.os, 'ubuntu') && matrix.container == '' && matrix.compiler == 'gcc' }} | |
| run: | | |
| sudo apt update | |
| #sudo apt list -a 'gcc-*' | |
| sudo apt install -y build-essential | |
| if (( ${COMPILER_VERSION} < 15 )) ; then | |
| sudo apt install -y gcc-${COMPILER_VERSION} | |
| else | |
| curl -L https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh -o install-homebrew.sh | |
| chmod +x install-homebrew.sh | |
| env CI=1 ./install-homebrew.sh | |
| HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew" | |
| ${HOMEBREW_PREFIX}/bin/brew install -v gcc@${COMPILER_VERSION} binutils | |
| ls -al ${HOMEBREW_PREFIX}/bin | |
| echo "PATH=${HOMEBREW_PREFIX}/bin:${PATH}" >> "$GITHUB_ENV" | |
| : Homebrew GCC@15 needs binutils 2.44+ | |
| HOMEBREW_BINUTILS=$(ls -d ${HOMEBREW_PREFIX}/Cellar/binutils/2.*/bin ) | |
| ls -al ${HOMEBREW_BINUTILS} | |
| echo "FFLAGS=$FFLAGS -B ${HOMEBREW_BINUTILS}" >> "$GITHUB_ENV" | |
| echo "CFLAGS=$CFLAGS -B ${HOMEBREW_BINUTILS}" >> "$GITHUB_ENV" | |
| echo "CXXFLAGS=$CXXFLAGS -B ${HOMEBREW_BINUTILS}" >> "$GITHUB_ENV" | |
| fi | |
| - name: Install Ubuntu Container Dependencies | |
| if: ${{ contains(matrix.os, 'ubuntu') && matrix.container != '' && !contains(matrix.container, 'phhargrove') }} | |
| run: | | |
| apt update | |
| apt install -y build-essential # pkg-config make git curl | |
| - name: Install macOS Dependencies | |
| if: contains(matrix.os, 'macos') && matrix.version == '12' | |
| run: | | |
| brew update | |
| brew install gcc@12 | |
| - name: Install LLVM on macOS | |
| if: contains(matrix.os, 'macos') && matrix.compiler == 'clang' | |
| run: | | |
| brew install llvm@${COMPILER_VERSION} | |
| # Prepend homebrew clang to PATH: | |
| echo "PATH=$(brew --prefix)/opt/llvm/bin:${PATH}" >> "$GITHUB_ENV" | |
| - name: Setup Compilers | |
| run: | | |
| if test "$CC" = "clang" ; then | |
| echo "CXX=clang++" >> "$GITHUB_ENV" | |
| elif test "$CC" = "icx" ; then | |
| echo "CXX=icpx" >> "$GITHUB_ENV" | |
| else | |
| echo "CC=gcc-${COMPILER_VERSION}" >> "$GITHUB_ENV" | |
| echo "CXX=g++-${COMPILER_VERSION}" >> "$GITHUB_ENV" | |
| # XCode 26 / gcc bug workaround: | |
| # <mach/mach_time.h> and <mach/mach.h> generate xnu_static_assert_struct_size errors from <mach/message.h> | |
| if [[ ${{ matrix.os }} =~ macos-26 ]] ; then | |
| echo "CONFIGURE_ARGS=$CONFIGURE_ARGS --enable-force-posix-realtime --disable-ccs-rpc" >> "$GITHUB_ENV" | |
| fi | |
| fi | |
| - name: Set Workflow Dispatch Environment | |
| if: github.event_name == 'workflow_dispatch' | |
| run: | | |
| for setting in ${{ inputs.env_vars }}; do | |
| echo $setting >> "$GITHUB_ENV" | |
| done | |
| - name: Version info | |
| run: | | |
| set +x | |
| echo == Platform version info == | |
| uname -a | |
| if test -r /etc/os-release ; then grep -e NAME -e VERSION /etc/os-release ; fi | |
| if test -x /usr/bin/sw_vers ; then /usr/bin/sw_vers ; fi | |
| echo | |
| echo == Tool version info == | |
| echo PATH="$PATH" | |
| for tool in ${CC} ${CXX} make ; do | |
| ( echo ; set -x ; w=$(which $tool) ; ls -al $w ; ls -alhL $w ; $tool --version ) | |
| done | |
| - name: configure | |
| run: | | |
| ./configure --prefix=$PWD/inst ${CONFIGURE_ARGS} | |
| - name: make all | |
| run: | | |
| make ${MAKE_FLAGS} all | |
| - name: make install | |
| run: | | |
| make ${MAKE_FLAGS} install | |
| - name: make test_install | |
| run: | | |
| make ${MAKE_FLAGS} test_install | |
| - name: make check | |
| run: | | |
| if [[ -z "$GASNET_SUPERNODE_MAXSIZE" ]] ; then | |
| if [[ ${RANKS} > 2 ]] ; then | |
| export GASNET_SUPERNODE_MAXSIZE=2 | |
| else | |
| export GASNET_SUPERNODE_MAXSIZE=1 | |
| fi | |
| fi | |
| make ${MAKE_FLAGS} check | |