Commit 0115df1a authored by Henderson, Shane's avatar Henderson, Shane
Browse files

Try to cover some Win and Nix

parent b476621d
Loading
Loading
Loading
Loading
+45 −41
Original line number Diff line number Diff line
@@ -2,27 +2,33 @@
  artifacts:
    paths:
      - build/
    expire_in: 1 day
    expire_in: 3 day

.gcc_83_before: &gcc_83_before
  - if [[ -f "/data/test_gcc/gcc-8.3.0/load_dev_env.sh" ]]; then BASE_DIR="/data/gitlab-runner"; . /data/test_gcc/gcc-8.3.0/load_dev_env.sh; ENV_BASE=/data/test_gcc/gcc-8.3.0; else BASE_DIR="/localhome/gitlab-runner"; . /projects/vera/gcc-8.3.0/load_dev_env.sh; ENV_BASE=/projects/vera/gcc-8.3.0; fi
  - which gcc
  - SRC_DIR=`pwd`
  - BLD_DIR="/tmp/$CI_PIPELINE_ID/$BLD_NAME"

.windows_before: &windows_before
    #Temporary but need conda
    - C:\Users\oxh\Miniconda3\\shell\\condabin\\conda-hook.ps1
    - conda activate 'C:\Users\oxh\Miniconda3'
    - conda activate saline_env
    - $SRC_DIR=$pwd.Path
    - $BLD_DIR="$SRC_DIR/tmp/$CI_PIPELINE_ID/build"

stages:
  - configure
  - build
    #  - test
  - test

windows_configure:
  tags:
    - windows
  stage: configure
  script:
    #Temporary but need conda
    - C:\Users\oxh\Miniconda3\\shell\\condabin\\conda-hook.ps1
    - conda activate 'C:\Users\oxh\Miniconda3'
    - conda activate saline_env
    - $SRC_DIR=$pwd.Path
    - $BLD_DIR="$SRC_DIR/tmp/$CI_PIPELINE_ID"
    - echo $SRC_DIR
    - echo $BLD_DIR
    - mkdir -p $BLD_DIR
    - *windows_before
    - cmake -S $SRC_DIR -B $BLD_DIR -Dsaline_ENABLE_Fortran=OFF -Dsaline_ENABLE_Python=ON -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE

windows_build:
@@ -30,12 +36,7 @@ windows_build:
    - windows
  stage: build
  script:
    #Temporary but need conda
    - C:\Users\oxh\Miniconda3\\shell\\condabin\\conda-hook.ps1
    - conda activate 'C:\Users\oxh\Miniconda3'
    - conda activate saline_env
    - $SRC_DIR=$pwd.Path
    - $BLD_DIR="$SRC_DIR/tmp/$CI_PIPELINE_ID"
    - *windows_before
    - cmake --build $BLD_DIR --target ALL_BUILD --config RELEASE
  dependencies:
    - windows_configure
@@ -43,32 +44,35 @@ windows_build:
windows_test:
  tags:
    - windows
  stage: build
  stage: test
  script:
    #Temporary but need conda
    - C:\Users\oxh\Miniconda3\\shell\\condabin\\conda-hook.ps1
    - conda activate 'C:\Users\oxh\Miniconda3'
    - conda activate saline_env
    - $SRC_DIR=$pwd.Path
    - $BLD_DIR="$SRC_DIR/tmp/$CI_PIPELINE_ID"
    - *windows_before
    - cd $BLD_DIR
    - ctest
  dependencies:
    - windows_build
    
      #linux_gcc83_testing:
      #  tags:
      #    - linux
      #    - gcc
      #  script:
      #    - if [[ -f "/data/test_gcc/gcc-8.3.0/load_dev_env.sh" ]]; then BASE_DIR="/data/gitlab-runner"; . /data/test_gcc/gcc-8.3.0/load_dev_env.sh; ENV_BASE=/data/test_gcc/gcc-8.3.0; else BASE_DIR="/localhome/gitlab-runner"; . /projects/vera/gcc-8.3.0/load_dev_env.sh; ENV_BASE=/projects/vera/gcc-8.3.0; fi
      #    - which gcc
      #    - SRC_DIR=`pwd`
      #    - BLD_DIR="/tmp/$CI_PIPELINE_ID/$BLD_NAME"
      #    - mkdir -p $BLD_DIR
      #    - cd $BLD_DIR
      #    - rm -rf *
      #    - echo $PATH
      #    - which gcc
      #    - echo "$PATH"
      #    - $SRC_DIR/ci/linux_gcc83_test.sh $SRC_DIR
linux_gcc83_configure:
  tags:
    - linux
    - gcc
  script:
    - *gcc_83_before
    - cmake -S $SRC_DIR -B $BLD_DIR -DCMAKE_BUILD_TYPE=RELEASE -Dsaline_ENABLE_Fortran=ON -DCMAKE_Fortran_FLAGS:STRING="-ffree-line-length-none" -Dsaline_ENABLE_Python=ON

linux_gcc83_build:
  tags:
    - linux
    - gcc
  script:
    - *gcc_83_before
    - cmake --build $BLD_DIR

linux_gcc83_test:
  tags:
    - linux
    - gcc
  script:
    - *gcc_83_before
    - cd $BLD_DIR
    - ctest