Skip to content
Closed
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
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# ignore build folders
bin
build
sconsbuild

# ignore test files
*.json
Expand Down
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*.ipynb linguist-detectable=false
*.ref filter=lfs diff=lfs merge=lfs -text
* text=auto
25 changes: 25 additions & 0 deletions .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Docker Build and Push

on:
push:
tags:
- 'v*'

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_puVQc24FIKKQsk-WMCCl_p62r_A"

- name: Build Docker image
run: docker build -t antonioleblanc/forefire:ci-test .

- name: Push Docker image
run: docker push antonioleblanc/forefire:ci-test
41 changes: 25 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -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
# - name: Test
# run: sh ./test-forefire.sh


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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ __pycache__
# jupyter notebooks checkpoints
.ipynb_checkpoints

# test output files
examples/**/*.json


CMakeLists.txt
build.sh

Expand Down
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# 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._

ForeFire is an [open-source code for wildland fire spread models](https://www.researchgate.net/publication/278769168_ForeFire_open-source_code_for_wildland_fire_spread_models), developed and maintained by Université de Corse Pascal Paoli.

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.
Expand Down Expand Up @@ -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

Expand Down