Skip to content

git submodules updated; dropped support for macos-big-sur since homeb… #155

git submodules updated; dropped support for macos-big-sur since homeb…

git submodules updated; dropped support for macos-big-sur since homeb… #155

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Compile Mac, Ubuntu, Windows
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains four jobs called "macOS","ubuntu20", "ubuntu22" and "windows"
ubuntu20:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Checkout submodules
run: git submodule update --init --recursive
# Runs a single command using the runners shell
- name: Getting packages
run: |
sudo apt-get update -y
sudo apt-get install libnetcdf-dev
sudo apt-get install libgd3
sudo apt-get -y --allow-downgrades install libgd3=2.2.5-5.2ubuntu2.1
sudo apt-get install libgd-dev
sudo apt-get install gfortran
sudo apt-get install devscripts
sudo apt-get install debhelper
# Runs a set of commands using the runners shell
- name: compile GLM
run: |
cd $GITHUB_WORKSPACE/glm-source
chmod u+x ./admin/make_release_info.sh
./build_glm.sh
mkdir -p $GITHUB_WORKSPACE/binaries/ubuntu/20.04
cp -r $GITHUB_WORKSPACE/glm-source/binaries/ubuntu/20.04/* $GITHUB_WORKSPACE/binaries/ubuntu/20.04/.
- name: run GLM FCR
run: |
cd glm-examples/FCR
$GITHUB_WORKSPACE/glm-source/GLM/glm
- name: run GLM Woods
run: |
cd glm-examples/Woods
$GITHUB_WORKSPACE/glm-source/GLM/glm
- name: run GLM Sparkling
run: |
cd glm-examples/Sparkling
$GITHUB_WORKSPACE/glm-source/GLM/glm
- name: run GLM Gross Dhuenn
run: |
cd glm-examples/GrosseDhuenn
$GITHUB_WORKSPACE/glm-source/GLM/glm
- name: run GLM Lake Alex
run: |
cd glm-examples/LakeAlexandrina
$GITHUB_WORKSPACE/glm-source/GLM/glm
#- uses: r-lib/actions/setup-pandoc@v2
#- uses: r-lib/actions/setup-r@v2
#- uses: r-lib/actions/setup-renv@v2
#- name: Run test and generate plots
# run: |
# cd glm-examples
# R -e 'source("install.R")'
# R -e 'install.packages("rmarkdown")'
# R -e 'rmarkdown::render("example_lakes.Rmd")'
# mv $GITHUB_WORKSPACE/glm-examples/example_lakes.md $GITHUB_WORKSPACE/glm-examples/README.md
- name: update binaries and push to remote
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git pull
git add -A
git commit -m "Update Ubuntu 20.04 binaries"
git push
ubuntu22:
# The type of runner that the job will run on
runs-on: ubuntu-22.04
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Checkout submodules
run: git submodule update --init --recursive
# Runs a single command using the runners shell
- name: Getting packages
run: |
sudo apt-get update -y
sudo apt-get install libnetcdf-dev
sudo apt-get install libgd3
sudo apt-get install libgd-dev
sudo apt-get install gfortran
sudo apt-get install devscripts
sudo apt-get install debhelper
# Runs a set of commands using the runners shell
- name: compile GLM
run: |
cd $GITHUB_WORKSPACE/glm-source
chmod u+x ./admin/make_release_info.sh
./build_glm.sh
mkdir -p $GITHUB_WORKSPACE/binaries/ubuntu/22.04
cp -r $GITHUB_WORKSPACE/glm-source/binaries/ubuntu/22.04/* $GITHUB_WORKSPACE/binaries/ubuntu/22.04/.
- name: update binaries and push to remote
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git pull
git add -A
git commit -m "Update Ubuntu 22.04 binaries"
git push
# macOS-BS:
# # The type of runner that the job will run on
# runs-on: macos-11
# env:
# GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
# # Steps represent a sequence of tasks that will be executed as part of the job
# steps:
# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# - uses: actions/checkout@v4
#
# - name: Checkout submodules
# run: git submodule update --init --recursive
# - name: Install packages
# run: |
# brew reinstall gcc
# brew install netcdf
# - name: compile GLM
# run: |
# cd $GITHUB_WORKSPACE/glm-source
# ./build_glm.sh
# MOSDIR=`grep 'SOFTWARE LICENSE AGREEMENT FOR ' '/System/Library/CoreServices/Setup Assistant.app/Contents/Resources/en.lproj/OSXSoftwareLicense.rtf' | awk -F 'macOS ' '{print $NF}' | tr -d '\\' | tr ' ' '_'`
# mkdir -p $GITHUB_WORKSPACE/binaries/macos/${MOSDIR}
# cp -r $GITHUB_WORKSPACE/glm-source/binaries/macos/${MOSDIR}/* $GITHUB_WORKSPACE/binaries/macos/${MOSDIR}/.
#
# - name: update binaries and push to remote
# run: |
# git config --global user.name "github-actions[bot]"
# git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
# git pull
# git add -A
# git commit -m "Update MacOS binaries"
# git push
macOS-S:
# The type of runner that the job will run on
runs-on: macos-14
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Install packages
run: |
brew reinstall gcc
brew install netcdf
brew install gd
- name: compile GLM
run: |
cd $GITHUB_WORKSPACE/glm-source
./build_glm.sh
MOSDIR=`grep 'SOFTWARE LICENSE AGREEMENT FOR ' '/System/Library/CoreServices/Setup Assistant.app/Contents/Resources/en.lproj/OSXSoftwareLicense.rtf' | awk -F 'macOS ' '{print $NF}' | tr -d '\\' | tr ' ' '_'`
mkdir -p $GITHUB_WORKSPACE/binaries/macos/${MOSDIR}
cp -r $GITHUB_WORKSPACE/glm-source/binaries/macos/${MOSDIR}/* $GITHUB_WORKSPACE/binaries/macos/${MOSDIR}/.
- name: update binaries and push to remote
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git pull
git add -A
git commit -m "Update MacOS binaries"
git push
windows:
# The type of runner that the job will run on
runs-on: windows-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Checkout submodules
run: |
git submodule update --init --recursive
- name: Install packages
run: |
choco install make
choco install mingw
choco install git
choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System'
- name: compile GLM
shell: bash
run: |
cd $GITHUB_WORKSPACE/glm-source/ancillary/windows/Sources
./build_all.sh
cd $GITHUB_WORKSPACE/glm-source
./build_glm.sh
mkdir -p $GITHUB_WORKSPACE/binaries/windows
cd $GITHUB_WORKSPACE/glm-source/binaries/windows
cp -r * $GITHUB_WORKSPACE/binaries/windows
# - name: run GLM FCR
# shell: bash
# run: |
# cd glm-examples/FCR
# echo now try running glm
# $GITHUB_WORKSPACE/binaries/windows/glm_latest/glm.exe
# echo run completed
- name: update binaries and push to remote
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git pull
git add -A
git commit -m "Update Windows binaries"
git push