From d3d7debaba7255a6db51bbbaf06887c02d379456 Mon Sep 17 00:00:00 2001 From: antonio-leblanc Date: Thu, 13 Feb 2025 12:21:03 -0300 Subject: [PATCH 01/10] fix folder path and add gitatributes for eol LF CRLF --- .gitattributes | 3 ++- README.md | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitattributes b/.gitattributes index 73704d2e..054d8597 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,2 @@ -*.ipynb linguist-detectable=false \ No newline at end of file +*.ipynb linguist-detectable=false +* text=auto \ No newline at end of file diff --git a/README.md b/README.md index 999e7351..3e1527da 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 From 902596b0ac1ee114c89352f9529bcc93a4bbb299 Mon Sep 17 00:00:00 2001 From: antonio-leblanc Date: Thu, 13 Feb 2025 12:38:30 -0300 Subject: [PATCH 02/10] fix test script --- .gitignore | 4 ++++ test-forefire.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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/test-forefire.sh b/test-forefire.sh index d6864db4..a4532a93 100644 --- a/test-forefire.sh +++ b/test-forefire.sh @@ -1,3 +1,3 @@ -cd examples/aullene +cd examples/03_real_fire ../../bin/forefire -i aullene.ff cd .. \ No newline at end of file From c9446652d5ce05ed8ee59aa1f1a9d8e7a9500943 Mon Sep 17 00:00:00 2001 From: antonio-leblanc Date: Thu, 13 Feb 2025 12:41:41 -0300 Subject: [PATCH 03/10] update ci --- .github/workflows/main.yml | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8143b4a8..f2a3be81 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,33 +1,25 @@ -# 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-test: + 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 From 51eca38f7ddb6005e5d0a63cae0eacd8078798dd Mon Sep 17 00:00:00 2001 From: antonio-leblanc Date: Thu, 13 Feb 2025 12:54:28 -0300 Subject: [PATCH 04/10] try docker build --- .github/workflows/main.yml | 37 ++++++++++++++++++++++++++----------- Dockerfile | 2 +- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f2a3be81..fcc9f19b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,19 +12,34 @@ on: jobs: - build-test: + # build-test: - runs-on: ubuntu-latest + # runs-on: ubuntu-latest - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 + # steps: + # # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + # - uses: actions/checkout@v3 + + # - name: Forefirebuild + # run: sudo sh ./install-forefire.sh - - name: Forefirebuild - run: sudo sh ./install-forefire.sh + # - name: Check version + # run: ./bin/forefire -v - - name: Check version - run: ./bin/forefire -v + # - name: Test + # run: sh ./test-forefire.sh - - name: Test - run: sh ./test-forefire.sh \ No newline at end of file + + 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 \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 7adb5f95..856710ce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM osgeo/gdal:ubuntu-small-3.3.1 +FROM ubuntu:22.04 # install requirements first to cache it RUN apt-get update From 9fc7b48930eabe4e3f5bc740d0f6574063cb5b99 Mon Sep 17 00:00:00 2001 From: antonio-leblanc Date: Thu, 13 Feb 2025 12:57:43 -0300 Subject: [PATCH 05/10] ci building docker img --- .github/workflows/main.yml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fcc9f19b..00f68166 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,27 +12,26 @@ on: jobs: - # build-test: + build-native: - # runs-on: ubuntu-latest + runs-on: ubuntu-latest - # steps: - # # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - # - uses: actions/checkout@v3 + steps: + - uses: actions/checkout@v3 - # - name: Forefirebuild - # run: sudo sh ./install-forefire.sh + - name: Forefirebuild + run: sudo sh ./install-forefire.sh - # - name: Check version - # run: ./bin/forefire -v + - name: Check version + run: ./bin/forefire -v - # - name: Test - # run: sh ./test-forefire.sh + - name: Test + run: sh ./test-forefire.sh docker: runs-on: ubuntu-latest - # needs: build_native + needs: build-native steps: - uses: actions/checkout@v3 From 561237c47e6b58c4ae96ed566418793f2ddf58ce Mon Sep 17 00:00:00 2001 From: antonio-leblanc Date: Thu, 13 Feb 2025 13:22:24 -0300 Subject: [PATCH 06/10] add test --- .dockerignore | 1 - .github/workflows/main.yml | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) 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/.github/workflows/main.yml b/.github/workflows/main.yml index 00f68166..a64d4310 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,4 +41,7 @@ jobs: - name: Test Docker Image run: | # Run the container and check the version output - docker run --rm forefire:latest forefire -v \ No newline at end of file + 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 From 71d9b3f06f0792f4e353af2276ed961de028b32a Mon Sep 17 00:00:00 2001 From: antonio-leblanc Date: Fri, 14 Feb 2025 16:15:18 -0300 Subject: [PATCH 07/10] try docker hub ci --- .github/workflows/dockerhub.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/dockerhub.yml diff --git a/.github/workflows/dockerhub.yml b/.github/workflows/dockerhub.yml new file mode 100644 index 00000000..c9cb4058 --- /dev/null +++ b/.github/workflows/dockerhub.yml @@ -0,0 +1,25 @@ +name: Docker Build and Push + +on: + push: + branches: + - ci-dockerhub # change later with tags generated + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v3 + + - name: Log in to Docker Hub # hardcoded token with short expiration we can change later + run: | + echo $DOCKER_PASSWORD | docker login -u "antonioleblanc" --password-stdin + env: + DOCKER_PASSWORD: "dckr_pat_zg-lvSZETPvHbIHCPVr22T8OK8Q" + + - name: Build Docker image + run: docker build -t antonioleblanc/forefire:ci-test . + + - name: Push Docker image + run: docker push antonioleblanc/forefire:ci-test From d8a92141c109c455daaf1f612457d584782adc08 Mon Sep 17 00:00:00 2001 From: antonio-leblanc Date: Fri, 14 Feb 2025 16:18:45 -0300 Subject: [PATCH 08/10] new token that will expire soon --- .github/workflows/dockerhub.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dockerhub.yml b/.github/workflows/dockerhub.yml index c9cb4058..79744899 100644 --- a/.github/workflows/dockerhub.yml +++ b/.github/workflows/dockerhub.yml @@ -16,7 +16,7 @@ jobs: run: | echo $DOCKER_PASSWORD | docker login -u "antonioleblanc" --password-stdin env: - DOCKER_PASSWORD: "dckr_pat_zg-lvSZETPvHbIHCPVr22T8OK8Q" + DOCKER_PASSWORD: "dckr_pat_puVQc24FIKKQsk-WMCCl_p62r_A" - name: Build Docker image run: docker build -t antonioleblanc/forefire:ci-test . From 78d4271275e7ff56ff2fc0b276bacbfc5a261fad Mon Sep 17 00:00:00 2001 From: antonio-leblanc Date: Fri, 14 Feb 2025 16:27:10 -0300 Subject: [PATCH 09/10] ci run with tags starting by v --- .github/workflows/dockerhub.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dockerhub.yml b/.github/workflows/dockerhub.yml index 79744899..cd0d3f15 100644 --- a/.github/workflows/dockerhub.yml +++ b/.github/workflows/dockerhub.yml @@ -2,8 +2,8 @@ name: Docker Build and Push on: push: - branches: - - ci-dockerhub # change later with tags generated + tags: + - 'v*' jobs: docker: From 62e088f964c8d4629a2cb3528ac99f197ed766b9 Mon Sep 17 00:00:00 2001 From: antonio-leblanc Date: Wed, 19 Feb 2025 23:49:36 -0300 Subject: [PATCH 10/10] docker file working --- .github/workflows/main.yml | 8 ++++---- Dockerfile | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a64d4310..e96d745a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,8 +25,8 @@ jobs: - name: Check version run: ./bin/forefire -v - - name: Test - run: sh ./test-forefire.sh + # - name: Test + # run: sh ./test-forefire.sh docker: @@ -43,5 +43,5 @@ jobs: # 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 + # - 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/Dockerfile b/Dockerfile index 856710ce..71b1f49d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ RUN apt-get update RUN apt install build-essential -y -RUN apt install libnetcdf-dev libnetcdf-c++4-dev -y +RUN apt install libnetcdf-c++4-dev -y RUN apt install cmake -y