diff --git a/.dockerignore b/.dockerignore index 396922b2..c8086a91 100644 --- a/.dockerignore +++ b/.dockerignore @@ -5,7 +5,6 @@ # ignore build folders bin build -sconsbuild # ignore test files *.json diff --git a/.gitattributes b/.gitattributes index ba301b9f..4443fdef 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,4 @@ *.ipynb linguist-detectable=false *.ref filter=lfs diff=lfs merge=lfs -text +# * text=auto +* text eol=lf diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8143b4a8..cab88d43 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,38 +1,47 @@ -# This is a basic workflow to help you get started with Actions +name: Build and Test on Ubuntu -name: CI - -# Controls when the workflow will run on: - # Triggers the workflow on push or pull request events but only for the "master" branch push: branches: - "master" - - "actions" + - "ci-v2" pull_request: branches: [ "master" ] - # 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 a single job called "build" - build: - # The type of runner that the job will run on + + build-native: + runs-on: ubuntu-latest - # 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@v3 - # Runs a single command using the runners shell - name: Forefirebuild run: sudo sh ./install-forefire.sh - name: Check version run: ./bin/forefire -v - - name: Test - run: sh ./test-forefire.sh \ No newline at end of file + # - name: Test + # run: cd tests && bash run.bash + + + docker: + runs-on: ubuntu-latest + needs: build-native + steps: + - uses: actions/checkout@v3 + + - name: Build Docker Image + run: docker build -t forefire:latest . + + - name: Test Docker Image + run: | + # Run the container and check the version output + docker run --rm forefire:latest forefire -v + + # - name: Run test inside Docker container + # run: docker run --rm forefire:latest sh ./test-forefire.sh \ No newline at end of file diff --git a/.gitignore b/.gitignore index 61d1679b..5dbba9cc 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,10 @@ __pycache__ # jupyter notebooks checkpoints .ipynb_checkpoints +# test output files +examples/**/*.json + + CMakeLists.txt build.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..71b1f49d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM ubuntu:22.04 + +# install requirements first to cache it +RUN apt-get update + +RUN apt install build-essential -y + +RUN apt install libnetcdf-c++4-dev -y + +RUN apt install cmake -y + +# copy files inside docker +WORKDIR /forefire + +COPY . . + +# install forefire +RUN sh cmake-build.sh + +# add executable to PATH +RUN cp /forefire/bin/forefire /bin diff --git a/README.md b/README.md index 7761d21f..d73e7d04 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ForeFire -![logo](./doc/images/forefire.jpg) +![logo](./docs/images/forefire.jpg) _Refer to the [Wiki](https://github.com/forefireAPI/firefront/wiki) for a more detailed guide on using ForeFire._ @@ -8,7 +8,7 @@ ForeFire is an [open-source code for wildland fire spread models](https://www.re Access the [demo simulator here](http://forefire.univ-corse.fr/sim/dev/). -![demo](./doc/images/sim-forefire.jpg) +![demo](./docs/images/sim-forefire.jpg) It has been designed and runs on Unix systems. Three modules can be built with the source code. @@ -75,7 +75,7 @@ export PATH="/mnt/c/gitrepos/forefire/bin:$PATH" ### 2.2 Scons and Other build systems -More information on other build systems are available [here](./doc/buildSystems/readme.MD) +More information on other build systems are available [here](./docs/buildSystems/readme.MD) ## 3. Running an example diff --git a/bindings/python/src/pyforefire/__init__.py b/bindings/python/src/pyforefire/__init__.py index 121d4f6d..22419299 100644 --- a/bindings/python/src/pyforefire/__init__.py +++ b/bindings/python/src/pyforefire/__init__.py @@ -1,6 +1,6 @@ -# src/pyforefire/__init__.py - -from .helpers import * -from ._pyforefire import * # Import the C++ extension - +# src/pyforefire/__init__.py + +from .helpers import * +from ._pyforefire import * # Import the C++ extension + __all__ = ['helpers', '_pyforefire'] \ No newline at end of file diff --git a/docs/UserGuide/ForeFireUserGuide.pdf b/docs/UserGuide/ForeFireUserGuide.pdf index 72ce6938..b664e552 100644 Binary files a/docs/UserGuide/ForeFireUserGuide.pdf and b/docs/UserGuide/ForeFireUserGuide.pdf differ diff --git a/docs/images/aullene.JPG b/docs/images/aullene.JPG index d228961e..3ff34d68 100644 Binary files a/docs/images/aullene.JPG and b/docs/images/aullene.JPG differ diff --git a/docs/images/forefire.jpg b/docs/images/forefire.jpg index 86a07ebb..792e7c0e 100644 Binary files a/docs/images/forefire.jpg and b/docs/images/forefire.jpg differ diff --git a/docs/images/forefire_help.JPG b/docs/images/forefire_help.JPG index 0035fc11..f2f3b983 100644 Binary files a/docs/images/forefire_help.JPG and b/docs/images/forefire_help.JPG differ diff --git a/docs/images/sim-forefire.jpg b/docs/images/sim-forefire.jpg index 70370ca4..d17dd6a2 100644 Binary files a/docs/images/sim-forefire.jpg and b/docs/images/sim-forefire.jpg differ