forked from danieljprice/phantom
-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (79 loc) · 5.26 KB
/
binary.yml
File metadata and controls
93 lines (79 loc) · 5.26 KB
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
91
92
93
name: binary
on:
workflow_call:
env:
SYSTEM: gfortran
PHANTOM_DIR: ${{ github.workspace }}
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
binary:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: install gfortran compiler
uses: fortran-lang/setup-fortran@v1
with:
compiler: gcc
- name: Check gfortran version
run: gfortran --version
- name: "Clone phantom"
uses: actions/checkout@v4
- name: "Download test files from v2025.0.0 release and run phantom binary unit test"
run: |
mkdir -p test_binary
cd test_binary
../scripts/writemake.sh binary > Makefile
make setup; make
# Download grow.in and grow.setup the v2025.0.0 release
curl -L -o profile9donor.data "https://github.com/danieljprice/phantom/releases/download/v2025.0.0/profile9donor.data"
curl -L -o profile9accretor.data "https://github.com/danieljprice/phantom/releases/download/v2025.0.0/profile9accretor.data"
curl -L -o binary.setup "https://github.com/danieljprice/phantom/releases/download/v2025.0.0/binary.setup"
curl -L -o binary.in "https://github.com/danieljprice/phantom/releases/download/v2025.0.0/binary.in"
curl -L -o poly.setup "https://github.com/danieljprice/phantom/releases/download/v2025.0.0/poly.setup"
curl -L -o poly.in "https://github.com/danieljprice/phantom/releases/download/v2025.0.0/poly.in"
curl -L -o sim.setup "https://github.com/danieljprice/phantom/releases/download/v2025.0.0/sim.setup"
curl -L -o giantbd.setup "https://github.com/danieljprice/phantom/releases/download/v2025.0.0/giantbd.setup"
curl -L -o giantbd.in "https://github.com/danieljprice/phantom/releases/download/v2025.0.0/giantbd.in"
curl -L -o subgiantProfile.data "https://github.com/danieljprice/phantom/releases/download/v2025.0.0/subgiantProfile.data"
curl -L -o BDProfile.data "https://github.com/danieljprice/phantom/releases/download/v2025.0.0/BDProfile.data"
# Verify SHA256 hashes (Linux compatible)
echo "95f9785284a5dc6e23d81991e12086218a4fa40e6449af43d205a8c613da2140 profile9donor.data" | sha256sum -c
echo "045d01f35387053e68701ed020192a69441b1e8feed41ba9a7faa8263300218c profile9accretor.data" | sha256sum -c
echo "6d716f293f457a7adefafd9a29447bffcec5ea72bf0bc93b19e25b27d26f52a3 binary.setup" | sha256sum -c
echo "efea56e820e15fbcd4fa47bc62cd7d9b3eb64794906227ba4c2145c431272487 binary.in" | sha256sum -c
echo "679ee7a3fd9af74063ebec4354c4c4235865aa26e8ee360d5711736839395459 poly.setup" | sha256sum -c
echo "b7b7a780d22d3ffc1541576f93d18cac811212d03aa6e1992ef1105af80e342f poly.in" | sha256sum -c
echo "f8b0bb9decb74b053b625d67c3df27c48d0f171b23d3e08848d4ef80e271b0dc sim.setup" | sha256sum -c
echo "a7942068b7cf30acb12878713fee9f2f05ef81e053098b5db3790241dc2e0759" giantbd.in | sha256sum -c
echo "162b07e5eaf6de88f2c7db70f52ca8675440bc1bd3ba7c768aa0a0b9ab52b2af" giantbd.setup | sha256sum -c
echo "f2842b837a83cf81a33596647beb53efbcdd63d2b98634f170f75e3a540accdb" subgiantProfile.data | sha256sum -c
echo "8b116b42b10677f403711fc2899903849a5cf764eb024257413b033de1dca21c" BDProfile.data | sha256sum -c
# run the test, run phantomsetup 3 times to ensure .setup file is rewritten if necessary
./phantomsetup binary.setup
./phantomsetup binary.setup
./phantomsetup binary.setup
# Check required files exist after phantomsetup on binary.setup
if [ ! -f relax1_00005 ]; then echo "Missing relax1_00005 after phantomsetup"; ls -la; exit 1; fi
if [ ! -f relax2_00005 ]; then echo "Missing relax2_00005 after phantomsetup"; ls -la; exit 1; fi
if [ ! -f binary_00000.tmp ]; then echo "Missing binary_00000.tmp after phantomsetup"; ls -la; exit 1; fi
./phantom binary.in
# now also run a test with a polytropic star
rm relax*
./phantomsetup poly.setup
./phantomsetup poly.setup
./phantom poly.in
# now also run a test with a polytrope + softened sink (https://github.com/danieljprice/phantom/issues/725)
rm relax*
./phantomsetup sim.setup
if [ ! -f relax1_00005 ]; then echo "Missing relax1_00005 after phantomsetup"; ls -la; exit 1; fi
if [ ! -f sim_00000.tmp ]; then echo "Missing sim_00000.tmp after phantomsetup"; ls -la; exit 1; fi
if [ ! -f sim.in ]; then echo "Missing sim.in after phantomsetup"; ls -la; exit 1; fi
# now also run a test with a giant + brown dwarf binary (https://github.com/danieljprice/phantom/issues/777)
rm relax*
./phantomsetup giantbd.setup
./phantomsetup giantbd.setup
if [ ! -f relax1_00010 ]; then echo "Missing relax1_00010 after phantomsetup"; ls -la; exit 1; fi
if [ ! -f relax2_00010 ]; then echo "Missing relax2_00010 after phantomsetup"; ls -la; exit 1; fi
if [ ! -f giantbd_00000.tmp ]; then echo "Missing giantbd_00000.tmp after phantomsetup"; ls -la; exit 1; fi
if [ ! -f giantbd.in ]; then echo "Missing giantbd.in after phantomsetup"; ls -la; exit 1; fi