Skip to content

Commit 5508a9f

Browse files
committed
add CI group for exampels
1 parent 06e7651 commit 5508a9f

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/Examples.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: NF Examples
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags: '*'
8+
pull_request:
9+
10+
concurrency:
11+
# Skip intermediate builds: always.
12+
# Cancel intermediate builds: only if it is a pull request build.
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
15+
16+
permissions:
17+
contents: write
18+
pull-requests: write
19+
20+
jobs:
21+
run-examples:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: julia-actions/setup-julia@v2
27+
with:
28+
version: '1'
29+
arch: 'x64'
30+
- uses: julia-actions/cache@v2
31+
- name: Run NF examples
32+
- run: |
33+
cd example
34+
julia --project=. --color=yes -e '
35+
using Pkg;
36+
Pkg.develop(PackageSpec(path=joinpath(pwd(), "..")));
37+
Pkg.instantiate();
38+
39+
@info "Running planar flow demo"
40+
include("demo_planar_flow.jl");
41+
42+
@info "Running radial flow demo"
43+
include("demo_radial_flow.jl");
44+
45+
@info "Running Real NVP demo"
46+
include("demo_RealNVP.jl");
47+
48+
@info "Running neural spline flow demo"
49+
include("demo_neural_spline_flow.jl");
50+
51+
@info "Running Hamiltonian flow demo"
52+
include("demo_hamiltonian_flow.jl");'
53+

0 commit comments

Comments
 (0)