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

Added basic Cmake support for Linux and Mac with Windows coming soon #304

Closed
wants to merge 53 commits into from

Conversation

makepath-alex
Copy link
Collaborator

Simple usage would be:

git clone <repo>
cd <repo>
mkdir build
cmake -S . -B build
cmake --build build --config Release -- -j8

This would build the basic libraries in Release configuration

If you want to also build and run the tests, you have to enable the ENABLE_TESTS option, which if OFF by default.
You can do it like so:

cmake -S . -B build -DENABLE_TESTS=ON

Then build as usual

To run the tests, go inside the build folder and tun ctest, for Example:

ctest -v

Note that for compiling the tests you need netcdff and for running them successfully you would also need the rrtmgp-data repo

dependabot bot and others added 14 commits July 6, 2024 11:19
…system-radiation#292)

Bumps [JamesIves/github-pages-deploy-action](https://github.com/jamesives/github-pages-deploy-action) from 4.6.1 to 4.6.3.
- [Release notes](https://github.com/jamesives/github-pages-deploy-action/releases)
- [Commits](JamesIves/github-pages-deploy-action@v4.6.1...v4.6.3)

---
updated-dependencies:
- dependency-name: JamesIves/github-pages-deploy-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Lumi CI: push as a branch, do not fail the clean-up if the pipeline is missing
* GitLab CI: do not duplicate reference types
* Self-hosted CI: a workaround for the old runtime on Daint
Bumps [JamesIves/github-pages-deploy-action](https://github.com/jamesives/github-pages-deploy-action) from 4.6.3 to 4.6.4.
- [Release notes](https://github.com/jamesives/github-pages-deploy-action/releases)
- [Commits](JamesIves/github-pages-deploy-action@v4.6.3...v4.6.4)

---
updated-dependencies:
- dependency-name: JamesIves/github-pages-deploy-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…tion/dependabot/github_actions/develop/JamesIves/github-pages-deploy-action-4.6.4

Bump JamesIves/github-pages-deploy-action from 4.6.3 to 4.6.4
Bumps [JamesIves/github-pages-deploy-action](https://github.com/jamesives/github-pages-deploy-action) from 4.6.4 to 4.6.6.
- [Release notes](https://github.com/jamesives/github-pages-deploy-action/releases)
- [Commits](JamesIves/github-pages-deploy-action@v4.6.4...v4.6.6)

---
updated-dependencies:
- dependency-name: JamesIves/github-pages-deploy-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…tion/dependabot/github_actions/develop/JamesIves/github-pages-deploy-action-4.6.6

Bump JamesIves/github-pages-deploy-action from 4.6.4 to 4.6.6
Bumps [JamesIves/github-pages-deploy-action](https://github.com/jamesives/github-pages-deploy-action) from 4.6.6 to 4.6.8.
- [Release notes](https://github.com/jamesives/github-pages-deploy-action/releases)
- [Commits](JamesIves/github-pages-deploy-action@v4.6.6...v4.6.8)

---
updated-dependencies:
- dependency-name: JamesIves/github-pages-deploy-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…tion/dependabot/github_actions/develop/JamesIves/github-pages-deploy-action-4.6.8

Bump JamesIves/github-pages-deploy-action from 4.6.6 to 4.6.8
…tion/hotfix-disable-lumi-CI

Based on problems with the Lumi software stack we will temporarily disable CI on that host. To be revisited after @skosukhin reports back from a hackathon the week of Nov 10.
Separate cloud optics kernels from the Fortran front-end implementation. Update `nvfortran` used in Levante CI to 24.07.
…system-radiation#303)

Bumps [JamesIves/github-pages-deploy-action](https://github.com/jamesives/github-pages-deploy-action) from 4.6.8 to 4.6.9.
- [Release notes](https://github.com/jamesives/github-pages-deploy-action/releases)
- [Commits](JamesIves/github-pages-deploy-action@v4.6.8...v4.6.9)

---
updated-dependencies:
- dependency-name: JamesIves/github-pages-deploy-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@makepath-alex
Copy link
Collaborator Author

makepath-alex commented Nov 21, 2024

Initial windows support done. To operate on Windows you need to work through a conda environment for the build process.
Basic instructions:

Install conda

https://docs.anaconda.com/miniconda/install/

Go to the location where you would like the conda env to reside
Create an empty conda environment like so:

mkdir -p env
cd env
conda create -p .

Activate the environment

conda activate ${PWD}

Install required packages

conda install -c conda-forge gfortran netcdf-fortran ninja gcc cmake

Build the repo:

cd <REPO>
mkdir -p build
cd build
cmake -G "Ninja" .. -DENABLE_TESTS=ON
cmake --build . --config Release

Run tests:

ctest -V

@RobertPincus
Copy link
Member

@makepath-alex Please update your branch with changes from develop in the main repo; this will turn off CI that isn't working.

Can you please modify containerized-ci.yml to use CMake? I might have to add CMake explicitly to the container.

Can you add Windows CI using CMake? I could try to help if need be.

@RobertPincus
Copy link
Member

@skosukhin Any thoughts welcome

… Added more info if netcdf.mod failes to be found
To work on Windows you need a conda environment for building the repo

Basic instructions:
1. Install conda

2. Go to the location where you would like the conda env to reside

   Create an empty conda environment like so:
	mkdir -p env
	cd env
	conda create -p .

3. Activate the environment

	conda activate ${PWD}

4. Install required packages

	conda install -c conda-forge gfortran netcdf-fortran ninja gcc cmake

5. Build the repo:

	cd <REPO>
	mkdir -p build
	cd build
	cmake -G "Ninja" .. -DENABLE_TESTS=ON
	cmake --build . --config Release

6 Run tests:

	ctest -V
Copy link
Member

@RobertPincus RobertPincus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update your branch with changes from develop in the main repo; this will turn off CI that isn't working.

Can you please modify containerized-ci.yml to use CMake? I might have to add CMake explicitly to the container.

Can you add Windows CI using CMake? I could try to help if need be.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update your branch with changes from develop in the main repo; this will turn off CI that isn't working.

Can you please modify containerized-ci.yml to use CMake? I might have to add CMake explicitly to the container.

Can you add Windows CI using CMake? I could try to help if need be.

@makepath-alex makepath-alex force-pushed the cmake branch 2 times, most recently from 1fec1fa to dc5191e Compare November 25, 2024 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants