From 0a512fc1c936a2e98def962fe814d5ce407ca803 Mon Sep 17 00:00:00 2001 From: Spencer Bryngelson Date: Thu, 18 Jan 2024 23:11:12 -0500 Subject: [PATCH] ci line count diff (#314) --- .github/workflows/count.yml | 35 ++---- .github/workflows/test.yml | 220 ++++++++++++++++++------------------ 2 files changed, 120 insertions(+), 135 deletions(-) diff --git a/.github/workflows/count.yml b/.github/workflows/count.yml index b3fb95566..552e12b5e 100644 --- a/.github/workflows/count.yml +++ b/.github/workflows/count.yml @@ -1,5 +1,10 @@ name: Check Line Counts -on: [push] +on: + push: + + pull_request: + + workflow_dispatch: jobs: sz: @@ -24,32 +29,12 @@ jobs: # ref: master # path: base - - name: Setup MFCs - run: | - BASE="$GITHUB_WORKSPACE/base" - PR="$GITHUB_WORKSPACE/pr" - cd $BASE - ./mfc.sh count - cd $PR - ./mfc.sh count - - - name: Counting Lines + - name: Get Line Diff run: | BASE="$GITHUB_WORKSPACE/base" PR="$GITHUB_WORKSPACE/pr" cd $BASE - echo "___BASE______________" - ./mfc.sh count - cd $PR - echo "___PR________________" - ./mfc.sh count - - # - name: Get Line Diff - # run: | - # BASE="$GITHUB_WORKSPACE/base" - # PR="$GITHUB_WORKSPACE/pr" - # cd $BASE - # export MFC_PR=$PR - # pwd - # ./mfc.sh count_diff + export MFC_PR=$PR + pwd + ./mfc.sh count_diff diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index df6b363ad..2ab289004 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,126 +1,126 @@ -name: 'Test Suite' +# name: 'Test Suite' -on: - push: - paths: - - '**.f90' - - '**.fpp' - - '**.py' - - '**.yml' - - 'mfc.sh' - - 'golden.txt' - - 'CMakeLists.txt' - - 'requirements.txt' +# on: +# push: +# paths: +# - '**.f90' +# - '**.fpp' +# - '**.py' +# - '**.yml' +# - 'mfc.sh' +# - 'golden.txt' +# - 'CMakeLists.txt' +# - 'requirements.txt' - pull_request: +# pull_request: - workflow_dispatch: +# workflow_dispatch: -jobs: - github: - name: Github - strategy: - matrix: - os: ['ubuntu', 'macos'] - mpi: ['mpi', 'no-mpi'] - debug: ['debug', 'no-debug'] - intel: [true, false] - exclude: - - intel: true - os: macos - fail-fast: false - continue-on-error: true - runs-on: ${{ matrix.os }}-latest - steps: - - name: Clone - uses: actions/checkout@v3 +# jobs: +# github: +# name: Github +# strategy: +# matrix: +# os: ['ubuntu', 'macos'] +# mpi: ['mpi', 'no-mpi'] +# debug: ['debug', 'no-debug'] +# intel: [true, false] +# exclude: +# - intel: true +# os: macos +# fail-fast: false +# continue-on-error: true +# runs-on: ${{ matrix.os }}-latest +# steps: +# - name: Clone +# uses: actions/checkout@v3 - - name: Setup MacOS - if: matrix.os == 'macos' - run: | - echo "CC=gcc-13" >> $GITHUB_ENV - echo "CXX=g++-13" >> $GITHUB_ENV - echo "FC=gfortran-13" >> $GITHUB_ENV - brew install wget make python make cmake coreutils gcc@13 +# - name: Setup MacOS +# if: matrix.os == 'macos' +# run: | +# echo "CC=gcc-13" >> $GITHUB_ENV +# echo "CXX=g++-13" >> $GITHUB_ENV +# echo "FC=gfortran-13" >> $GITHUB_ENV +# brew install wget make python make cmake coreutils gcc@13 - - name: (MacOS) Build OpenMPI - if: matrix.os == 'macos' && matrix.mpi == 'mpi' - run: | - echo "OMPI_FC=gfortran-13" >> $GITHUB_ENV - echo "OMPI_CXX=g++-13" >> $GITHUB_ENV - echo "OMPI_MPICC=gcc-13" >> $GITHUB_ENV - HOMEBREW_MAKE_JOBS=$(nproc) brew install --cc=gcc-13 --verbose --build-from-source open-mpi +# - name: (MacOS) Build OpenMPI +# if: matrix.os == 'macos' && matrix.mpi == 'mpi' +# run: | +# echo "OMPI_FC=gfortran-13" >> $GITHUB_ENV +# echo "OMPI_CXX=g++-13" >> $GITHUB_ENV +# echo "OMPI_MPICC=gcc-13" >> $GITHUB_ENV +# HOMEBREW_MAKE_JOBS=$(nproc) brew install --cc=gcc-13 --verbose --build-from-source open-mpi - - name: Setup Ubuntu - if: matrix.os == 'ubuntu' && matrix.intel == false - run: | - sudo apt update -y - sudo apt install -y tar wget make cmake gcc g++ python3 python3-dev "openmpi-*" libopenmpi-dev +# - name: Setup Ubuntu +# if: matrix.os == 'ubuntu' && matrix.intel == false +# run: | +# sudo apt update -y +# sudo apt install -y tar wget make cmake gcc g++ python3 python3-dev "openmpi-*" libopenmpi-dev - - name: Setup Ubuntu (Intel) - if: matrix.os == 'ubuntu' && matrix.intel == true - run: | - sudo apt install tar wget make cmake python3 python3-dev - wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB - sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB - rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB - sudo echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list - sudo apt-get update - sudo apt-get install -y intel-oneapi-common-vars intel-oneapi-compiler-fortran-2022.1.0 intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2022.1.0 intel-oneapi-mkl-2021.4.0 intel-oneapi-mpi-2021.7.1 intel-oneapi-mpi-devel-2021.7.1 - source /opt/intel/oneapi/setvars.sh - echo "CXX=$(which icpc)" >> $GITHUB_ENV - echo "CC=$(which icc)" >> $GITHUB_ENV - echo "FC=$(which ifort)" >> $GITHUB_ENV - echo "OMPI_FC=$(which ifort)" >> $GITHUB_ENV - echo "OMPI_CXX=$(which icpc)" >> $GITHUB_ENV - echo "OMPI_MPICC=$(which icc)" >> $GITHUB_ENV - echo "MPI_HOME=/opt/intel/oneapi/mpi/2021.7.1/" >> $GITHUB_ENV - echo "I_MPI_ROOT=/opt/intel/oneapi/mpi/2021.7.1/" >> $GITHUB_ENV +# - name: Setup Ubuntu (Intel) +# if: matrix.os == 'ubuntu' && matrix.intel == true +# run: | +# sudo apt install tar wget make cmake python3 python3-dev +# wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB +# sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB +# rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB +# sudo echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list +# sudo apt-get update +# sudo apt-get install -y intel-oneapi-common-vars intel-oneapi-compiler-fortran-2022.1.0 intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2022.1.0 intel-oneapi-mkl-2021.4.0 intel-oneapi-mpi-2021.7.1 intel-oneapi-mpi-devel-2021.7.1 +# source /opt/intel/oneapi/setvars.sh +# echo "CXX=$(which icpc)" >> $GITHUB_ENV +# echo "CC=$(which icc)" >> $GITHUB_ENV +# echo "FC=$(which ifort)" >> $GITHUB_ENV +# echo "OMPI_FC=$(which ifort)" >> $GITHUB_ENV +# echo "OMPI_CXX=$(which icpc)" >> $GITHUB_ENV +# echo "OMPI_MPICC=$(which icc)" >> $GITHUB_ENV +# echo "MPI_HOME=/opt/intel/oneapi/mpi/2021.7.1/" >> $GITHUB_ENV +# echo "I_MPI_ROOT=/opt/intel/oneapi/mpi/2021.7.1/" >> $GITHUB_ENV - - name: Build - run: | - if [ '${{ matrix.intel }}' == 'true' ]; then source /opt/intel/oneapi/setvars.sh; fi - /bin/bash mfc.sh build -j $(nproc) --${{ matrix.debug }} --${{ matrix.mpi }} +# - name: Build +# run: | +# if [ '${{ matrix.intel }}' == 'true' ]; then source /opt/intel/oneapi/setvars.sh; fi +# /bin/bash mfc.sh build -j $(nproc) --${{ matrix.debug }} --${{ matrix.mpi }} - - name: Test - run: | - if [ '${{ matrix.intel }}' == 'true' ]; then source /opt/intel/oneapi/setvars.sh; fi - /bin/bash mfc.sh test -j $(nproc) $OPT1 $OPT2 - env: - OPT1: ${{ matrix.mpi == 'mpi' && '--test-all' || '' }} - OPT2: ${{ matrix.debug == 'debug' && '-% 20' || '' }} +# - name: Test +# run: | +# if [ '${{ matrix.intel }}' == 'true' ]; then source /opt/intel/oneapi/setvars.sh; fi +# /bin/bash mfc.sh test -j $(nproc) $OPT1 $OPT2 +# env: +# OPT1: ${{ matrix.mpi == 'mpi' && '--test-all' || '' }} +# OPT2: ${{ matrix.debug == 'debug' && '-% 20' || '' }} - docker: - name: Github | Docker - runs-on: ubuntu-latest - steps: - - name: Clone - uses: actions/checkout@v3 +# docker: +# name: Github | Docker +# runs-on: ubuntu-latest +# steps: +# - name: Clone +# uses: actions/checkout@v3 - - name: Test - run: sudo ./mfc.sh docker ./mfc.sh test -j $(nproc) -a +# - name: Test +# run: sudo ./mfc.sh docker ./mfc.sh test -j $(nproc) -a - self: - name: Georgia Tech | Phoenix (NVHPC) - if: github.repository == 'MFlowCode/MFC' - continue-on-error: true - strategy: - matrix: - device: ['cpu', 'gpu'] - runs-on: - group: phoenix - labels: self-hosted - steps: - - name: Clone - uses: actions/checkout@v3 +# self: +# name: Georgia Tech | Phoenix (NVHPC) +# if: github.repository == 'MFlowCode/MFC' +# continue-on-error: true +# strategy: +# matrix: +# device: ['cpu', 'gpu'] +# runs-on: +# group: phoenix +# labels: self-hosted +# steps: +# - name: Clone +# uses: actions/checkout@v3 - - name: Build & Test - run: bash .github/workflows/phoenix/submit.sh .github/workflows/phoenix/test.sh ${{ matrix.device }} +# - name: Build & Test +# run: bash .github/workflows/phoenix/submit.sh .github/workflows/phoenix/test.sh ${{ matrix.device }} - - name: Archive Logs - uses: actions/upload-artifact@v3 - if: always() - with: - name: logs - path: test-${{ matrix.device }}.out +# - name: Archive Logs +# uses: actions/upload-artifact@v3 +# if: always() +# with: +# name: logs +# path: test-${{ matrix.device }}.out