-
Notifications
You must be signed in to change notification settings - Fork 18
72 lines (64 loc) · 2.29 KB
/
main.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
# This workflow will install RST and eventually run tests
name: Compilation Test
on: [push, pull_request]
jobs:
build:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest"]
cc: ["gcc-default"]
cdf: ["39_0"]
name: ${{ matrix.cc }} on ${{ matrix.os }} with CDF ${{ matrix.cdf }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install Ubuntu dependencies
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
cat build/.requirements.ubuntu | xargs sudo apt-get install
echo "Get and install NASA CDF"
sudo apt-get install wget
wget https://spdf.gsfc.nasa.gov/pub/software/cdf/dist/latest/linux/cdf${{ matrix.cdf }}-dist-cdf.tar.gz
tar -xzvf cdf${{ matrix.cdf }}-dist-cdf.tar.gz
cd cdf${{ matrix.cdf }}-dist
make OS=linux ENV=gnu all
make test
sudo make INSTALLDIR=/usr/local/cdf install
- name: Install MacOS dependencies
if: startsWith(matrix.os, 'mac')
run: |
brew update-reset
xargs brew install < build/.requirements.darwin
echo "Get and install NASA CDF"
brew install wget
wget https://spdf.gsfc.nasa.gov/pub/software/cdf/dist/latest/linux/cdf${{ matrix.cdf }}-dist-cdf.tar.gz
tar -xzvf cdf${{ matrix.cdf }}-dist-cdf.tar.gz
cd cdf${{ matrix.cdf }}-dist
make OS=macosx ENV=arm all
make test
sudo make INSTALLDIR=/usr/local/cdf install
brew install --cask xquartz
- name: Build and make Linux code
if: startsWith(matrix.os, 'ubuntu')
run: |
export RSTPATH=$(pwd)
source .profile.bash
build/script/make.build
build/script/make.code
build/script/make.doc
- name: Build and make MacOS code
if: startsWith(matrix.os, 'mac')
run: |
export RSTPATH=$(pwd)
cp .github/test_profiles/profile.bash.darwin .profile.bash
cp .github/test_profiles/base.bash.darwin .profile/base.bash
cp .github/test_profiles/makelib.darwin build/make/makelib.darwin
source .profile.bash
echo $SYSTEM
echo $OSTYPE
echo $NETCDF_PATH
build/script/make.build
build/script/make.code
build/script/make.doc