-
-
Notifications
You must be signed in to change notification settings - Fork 15
90 lines (73 loc) · 2.18 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Bmad Ecosystem - Build & Test
on:
# Run on demand
workflow_dispatch:
# Run on push to main
push:
branches:
- "main"
# Run on pull requests
pull_request:
# Run on PR from DCS
workflow_run:
workflows: ["dcs16_push"]
types:
- completed
## Future Ideas:
## PR make it 10 or less
## For main and time based we can run something bigger
## Run when releases are published
## release:
## types:
## - "published"
# Configuration for the version of external dependencies
# We do this so we can cache them and avoid checking out that big
# repository at all times.
env:
EXTERNAL_DEPS_VERSION: main
#
jobs:
build:
runs-on: ${{ matrix.os }}
#
defaults:
run:
shell: bash
strategy:
matrix:
# Future Ideas:
# add macOS - check if GH Actions can make intel and arm
os: [ubuntu-latest]
shared: ["Y"]
openmp_mpi: ["N", "Y"]
steps:
# Check out the code from GitHub
- uses: actions/checkout@v4
# Install system dependencies
- name: Install System Dependencies
run: |
sudo apt update
sudo apt-get install gfortran g++ cmake libtool-bin libreadline-dev libpango1.0-dev libssl-dev bc libopenmpi-dev openmpi-bin openmpi-common
# sudo apt install build-essential curl wget cmake gfortran automake \
# autoconf libtool m4 libgomp1 libreadline-dev libncurses-dev pkg-config \
# libcairo2-dev libpango1.0-dev libxt-dev libx11-dev -y
# In case we don't have it available, check it out
- name: Checkout External Dependencies
run: |
git clone --depth 1 --branch ${{ env.EXTERNAL_DEPS_VERSION }} https://github.com/bmad-sim/bmad-external-deps.git ~/external_deps
#
- name: Extract dependencies
run: |
for dep in ~/external_deps/*.tar.gz; \
do \
tar xzvf $dep -C $GITHUB_WORKSPACE/; \
done
#
- name: Build
env:
USE_MPI: ${{ matrix.openmp_mpi }}
SHARED: ${{ matrix.shared }}
run: .github/scripts/install_bmad.sh
#
- name: Run Tests
run: .github/scripts/run_tests.sh