Skip to content

Dev

Dev #60

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}
- {version: nightly, os: ubuntu-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.8'
- 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)'