Skip to content

Commit

Permalink
Merge pull request #103 from SotaYoshida/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
SotaYoshida authored Oct 31, 2023
2 parents adc22d7 + 11e4487 commit 6e137b7
Show file tree
Hide file tree
Showing 64 changed files with 14,255 additions and 11,552 deletions.
79 changes: 66 additions & 13 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ name: CI
on:
push:
branches:
- main
- dev
- develop
tags: '*'
pull_request:
exclude: "log_sample_script.txt"

concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
Expand All @@ -18,30 +17,81 @@ jobs:
strategy:
fail-fast: false
matrix:
version:
- '1.7'
- 'nightly'
os:
- ubuntu-latest
arch:
- x64
include:
- {version: '1.9', os: ubuntu-latest, payload: serial}
- {version: '1.9', os: macOS-latest, payload: serial}
- {version: '1.9', os: windows-latest, payload: serial}
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
arch: x64
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
env:
JULIA_NUM_THREADS: 2
if: ${{ matrix.payload == 'serial' }}
continue-on-error: ${{ matrix.version == 'nightly' }}
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- {version: '1.9', os: 'ubuntu-latest', payload: mpi}
mpi: [ 'openmpi' ]
name: mpi test
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: x64
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- name: "Run mpi tests"
run: |
export JULIA_PROJECT=@.
export JULIA_MPIEXEC=mpiexecjl
export JULIA_NUM_THREADS=1
julia --project -e 'ENV["JULIA_MPI_BINARY"]=""; using Pkg; Pkg.add("MPI"); Pkg.build("MPI"; verbose=true); using MPI; MPI.install_mpiexecjl()'
julia --project=@. -e "using InteractiveUtils; versioninfo(verbose=true)"
julia --project=@. -e "using Pkg; Pkg.instantiate(); Pkg.build()"
export PATH=$PATH:/home/runner/.julia/bin
mpiexecjl -n 4 julia --depwarn=yes --project=@. ./test/mpirun_test.jl
build2:
runs-on: 'ubuntu-latest'
strategy:
fail-fast: false
matrix:
include:
- {version: '1.9', os: 'ubuntu-latest'}
name: Run sample_script.jl
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: x64
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- run: |
git_hash=$(git rev-parse --short "$GITHUB_SHA")
julia --project="@." -t 4 ./example/sample_script.jl > ./example/log_sample_script.txt
- name: commit changed logfile
uses: stefanzweifel/[email protected]
with:
commit_message: Update log_sample_script.txt
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1'
version: '1.9'
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-docdeploy@v1
env:
Expand All @@ -53,3 +103,6 @@ jobs:
using NuclearToolkit
DocMeta.setdocmeta!(NuclearToolkit, :DocTestSetup, :(using NuclearToolkit); recursive=true)
doctest(NuclearToolkit)'
116 changes: 116 additions & 0 deletions .github/workflows/CI_pullrequest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: CI_PR
on:
pull_request:
branches:
- main
- develop
tags: '*'
exclude: "log_sample_script.txt"
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- {version: '1.9', os: ubuntu-latest, payload: serial}
- {version: '1.9', os: macOS-latest, payload: serial}
- {version: '1.9', os: windows-latest, payload: serial}
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: x64
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
env:
JULIA_NUM_THREADS: 2
if: ${{ matrix.payload == 'serial' }}
continue-on-error: ${{ matrix.version == 'nightly' }}
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- {version: '1.9', os: ubuntu-latest, payload: mpi}
mpi: [ 'openmpi' ]
name: mpi test
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: x64
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- name: "Run mpi tests"
run: |
export JULIA_PROJECT=@.
export JULIA_MPIEXEC=mpiexecjl
export JULIA_NUM_THREADS=1
julia --project -e 'ENV["JULIA_MPI_BINARY"]=""; using Pkg; Pkg.add("MPI"); Pkg.build("MPI"; verbose=true); using MPI; MPI.install_mpiexecjl()'
julia --project=@. -e "using InteractiveUtils; versioninfo(verbose=true)"
julia --project=@. -e "using Pkg; Pkg.instantiate(); Pkg.build()"
export PATH=$PATH:/home/runner/.julia/bin
mpiexecjl -n 4 julia --depwarn=yes --project=@. ./test/mpirun_test.jl
# build2:
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# include:
# - {version: '1.8', os: ubuntu-latest}
# name: Run sample_script.jl
# steps:
# - uses: actions/checkout@v2
# with:
# fetch-depth: 0
# - uses: julia-actions/setup-julia@v1
# with:
# version: ${{ matrix.version }}
# arch: x64
# - uses: julia-actions/cache@v1
# - uses: julia-actions/julia-buildpkg@v1
# - run: |
# git_hash=$(git rev-parse --short "$GITHUB_SHA")
# echo git_hash $git_hash
# echo running on branch ${GITHUB_REF##*/}
# echo git_hash:[$git_hash] > ./example/log_sample_script.txt
# julia --project="@." -t 4 ./example/sample_script.jl >> ./example/log_sample_script.txt
# git add example/log_sample_script.txt
# - name: commit changed logfile
# uses: stefanzweifel/[email protected]
# with:
# commit_message: Update log_sample_script.txt
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1.9'
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
- run: |
julia --project=docs -e '
using Documenter: DocMeta, doctest
using NuclearToolkit
DocMeta.setdocmeta!(NuclearToolkit, :DocTestSetup, :(using NuclearToolkit); recursive=true)
doctest(NuclearToolkit)'
26 changes: 26 additions & 0 deletions .github/workflows/draft-pdf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
on:
push:
paths:
- "paper/*"

jobs:
paper:
runs-on: ubuntu-latest
name: Paper Draft
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build draft PDF
uses: openjournals/openjournals-draft-action@master
with:
journal: joss
# This should be the path to the paper within your repo.
paper-path: paper/paper.md
- name: Upload
uses: actions/upload-artifact@v1
with:
name: paper
# This is the output path where Pandoc will write the compiled
# PDF. Note, this should be the same directory as the input
# paper.md
path: paper/paper.pdf
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ docs/.DS_Store
*.snt.bin
/snts
/flowOmega
logfile.dat
*/logfile.dat

Loading

0 comments on commit 6e137b7

Please sign in to comment.