Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update conda_macos to fix problems with Github Actions testing #853

Merged
merged 25 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 35 additions & 8 deletions .github/workflows/test-cice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: GHActions
on:
push:
branches:
- master
- main
- 'CICE*'
- 'ghactions*'
pull_request:
Expand All @@ -27,8 +27,12 @@ jobs:
matrix:
# os: [macos-latest, ubuntu-latest]
os: [macos-latest]
# os: [macos-13]
# os: [ubuntu-latest]
include:
# - os: macos-13
# envdef: macos
# minicond: Miniconda3-latest-MacOSX-x86_64.sh
- os: macos-latest
envdef: macos
minicond: Miniconda3-latest-MacOSX-x86_64.sh
Expand Down Expand Up @@ -98,10 +102,26 @@ jobs:
conda env create -f configuration/scripts/machines/environment.yml
- name: check conda env
run: |
conda activate cice && which mpicc && which mpifort && which make
conda activate cice && which clang && which gfortran && which mpicc && which mpifort && which make
clang --version
gfortran --version
mpifort --version
mpicc --version
make --version
# echo "mpifort -v:"
# mpifort -v
# echo "mpifort --showme:compile:"
# mpifort --showme:compile
# echo "mpifort --showme:link:"
# mpifort --showme:link
# echo "mpifort --showme:command:"
# mpifort --showme:command
# echo "mpifort --showme:libdirs:"
# mpifort --showme:libdirs
# echo "mpifort --showme:libs:"
# mpifort --showme:libs
# echo "mpifort --showme:incdirs:"
# mpifort --showme:incdirs
- name: check setup case
run: |
cd $HOME/cice
Expand All @@ -110,12 +130,19 @@ jobs:
run: |
cd $HOME/cice
./cice.setup -m conda -e ${{ matrix.envdef }} --test smoke --testid c0
# - name: compile case
# run: |
# cd $HOME/cice
# ./cice.setup -m conda -e ${{ matrix.envdef }} -c case1
# cd case1
# ./cice.build
- name: run hello world unit test
run: |
cd $HOME/cice
./cice.setup -m conda -e ${{ matrix.envdef }} --test unittest --pes 2x1 -s helloworld --testid hw01
cd *helloworld*hw01
./cice.build
./cice.run
- name: check cice compile
run: |
cd $HOME/cice
./cice.setup -m conda -e ${{ matrix.envdef }} -c case1 --pes 2x2 -s diag1
cd case1
./cice.build
- name: download input data
run: |
cd $HOME/cice-dirs/input
Expand Down
10 changes: 6 additions & 4 deletions configuration/scripts/machines/Macros.conda_macos
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ endif
# C and Fortran compilers and MPI wrappers
SCC := clang
SFC := gfortran
MPICC := mpicc
MPIFC := mpifort
#MPICC := mpicc
#MPIFC := mpifort
MPICC := clang
MPIFC := gfortran

ifeq ($(ICE_COMMDIR), mpi)
FC := $(MPIFC)
Expand All @@ -37,7 +39,7 @@ endif
LD:= $(FC)

# Location of the compiled Fortran modules (NetCDF)
MODDIR += -I$(CONDA_PREFIX)/include
MODDIR += -I$(CONDA_PREFIX)/include -I$(CONDA_PREFIX)/lib

# Location of the system C header files (required on recent macOS to compile makdep)