@@ -79,81 +79,71 @@ jobs:
79
79
omp : " on"
80
80
81
81
steps :
82
- - uses : actions/checkout@v3
83
- with :
84
- submodules : recursive
82
+ - uses : actions/checkout@v4
85
83
86
84
# Enable tmate debugging of manually-triggered workflows if the input option was provided
87
85
- name : Setup tmate session
88
86
uses : mxschmitt/action-tmate@v3
89
87
if : ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
90
88
89
+ - name : Prepare ccache timestamp
90
+ id : ccache_cache_timestamp
91
+ run : echo "{date_and_time}={$(date +'%Y-%m-%d-%H;%M;%S')}" >> $GITHUB_OUTPUT
92
+ - name : Set ccache cache directory
93
+ shell : bash
94
+ run : echo "CCACHE_DIR=${{runner.workspace}}/.ccache" >> "${GITHUB_ENV}"
95
+ - name : Cache ccache files
96
+ uses : actions/cache@v3
97
+ with :
98
+ path : ${{runner.workspace}}/.ccache
99
+ key : ${{matrix.os}}-${{matrix.cxx}}-${{matrix.mpi}}-${{matrix.omp}}-${{ steps.ccache_cache_timestamp.outputs.date_and_time }}
100
+ restore-keys : |
101
+ ${{ matrix.os }}-${{ matrix.cxx }}-${{ matrix.mpi }}-${{ matrix.omp }}
102
+ ${{ matrix.os }}-${{ matrix.cxx }}-${{ matrix.mpi }}
103
+ ${{ matrix.os }}-${{ matrix.cxx }}
104
+ ${{ matrix.os }}
105
+
106
+ # - name: Clear ccache
107
+ # run: ccache --clear
108
+
91
109
- name : Install Dependencies on Ubunutu
92
110
if : ${{ contains(matrix.os, 'ubuntu') }}
93
111
run : |
94
112
sudo apt update
95
113
sudo apt install openmpi-bin libopenmpi-dev ccache graphviz libeigen3-dev libspdlog-dev libtiff-dev libcfitsio-dev libbenchmark-dev libboost-all-dev libyaml-cpp-dev
96
- git clone https://github.com/catchorg/Catch2.git -b v3.4.0
97
- mkdir Catch2/build
98
- cd Catch2/build
99
- cmake .. -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/local
100
- make -j$(nproc --ignore 1) install
101
- cd -
102
- wget --no-check-certificate --no-verbose http://www.fftw.org/fftw-3.3.10.tar.gz -O- | tar --no-same-owner -xz;
103
- cd fftw-3.3.10
104
- ./configure --prefix=${{github.workspace}}/local --enable-shared
105
- make -j$(nproc --ignore 1) install CFLAGS=-fPIC
106
- # Fix bug in FFT3 (cf. https://github.com/FFTW/fftw3/issues/332)
107
- sed -i -e 's/^.*FFTW3LibraryDepends.cmake.*$//1' ${{github.workspace}}/local/lib*/cmake/*/FFTW3Config.cmake
108
- cd -
109
114
110
115
- name : Install Dependencies on MacOS
111
116
if : ${{ contains(matrix.os, 'macos') }}
112
117
run : |
113
118
brew install gcc libtiff open-mpi libomp eigen libyaml ccache cfitsio boost yaml-cpp
114
119
echo "CMAKE_PREFIX_PATH=/opt/homebrew/opt/libomp" >> $GITHUB_ENV
115
120
echo "/opt/homebrew/opt/ccache/libexec" >> $GITHUB_PATH
116
- git clone https://github.com/catchorg/Catch2.git -b v3.4.0
121
+
122
+ - name : Checkout Catch2
123
+ uses : actions/checkout@v4
124
+ with :
125
+ repository : catchorg/Catch2.git
126
+ path : Catch2
127
+ ref : v3.4.0
128
+
129
+ - name : Build Catch2
130
+ run : |
117
131
mkdir Catch2/build
118
132
cd Catch2/build
119
133
cmake .. -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/local
120
134
make -j$(nproc --ignore 1) install
121
- cd -
135
+
136
+ - name : Install FFTW
137
+ run : |
122
138
wget --no-check-certificate --no-verbose http://www.fftw.org/fftw-3.3.10.tar.gz -O- | tar --no-same-owner -xz;
123
139
cd fftw-3.3.10
124
140
./configure --prefix=${{github.workspace}}/local --enable-shared
125
141
make -j$(nproc --ignore 1) install CFLAGS=-fPIC
126
142
# Fix bug in FFT3 (cf. https://github.com/FFTW/fftw3/issues/332)
127
143
sed -i -e 's/^.*FFTW3LibraryDepends.cmake.*$//1' ${{github.workspace}}/local/lib*/cmake/*/FFTW3Config.cmake
128
- cd -
129
-
130
- - name : Select Python 3.10
131
- uses : actions/setup-python@v4
132
- with :
133
- python-version : ' 3.10'
134
-
135
- - name : Prepare ccache timestamp
136
- id : ccache_cache_timestamp
137
- run : echo "{date_and_time}={$(date +'%Y-%m-%d-%H;%M;%S')}" >> $GITHUB_OUTPUT
138
- - name : Set ccache cache directory
139
- shell : bash
140
- run : echo "CCACHE_DIR=${{runner.workspace}}/.ccache" >> "${GITHUB_ENV}"
141
- - name : Cache ccache files
142
- uses : actions/cache@v3
143
- with :
144
- path : ${{runner.workspace}}/.ccache
145
- key : ${{matrix.os}}-${{matrix.cxx}}-${{matrix.mpi}}-${{matrix.omp}}-${{ steps.ccache_cache_timestamp.outputs.date_and_time }}
146
- restore-keys : |
147
- ${{ matrix.os }}-${{ matrix.cxx }}-${{ matrix.mpi }}-${{ matrix.omp }}
148
- ${{ matrix.os }}-${{ matrix.cxx }}-${{ matrix.mpi }}
149
- ${{ matrix.os }}-${{ matrix.cxx }}
150
- ${{ matrix.os }}
151
-
152
- # - name: Clear ccache
153
- # run: ccache --clear
154
144
155
145
- name : Checkout SOPT
156
- uses : actions/checkout@v3
146
+ uses : actions/checkout@v4
157
147
with :
158
148
repository : astro-informatics/sopt.git
159
149
path : sopt
@@ -162,19 +152,15 @@ jobs:
162
152
- name : Build sopt
163
153
run : |
164
154
export CMAKE_PREFIX_PATH=${{github.workspace}}/local:$CMAKE_PREFIX_PATH
165
- #export CMAKE_PREFIX_PATH=${{github.workspace}}/Catch2/build/lib/cmake:$CMAKE_PREFIX_PATH
166
155
mkdir -p ${{github.workspace}}/sopt/build
167
156
cd ${{github.workspace}}/sopt/build
168
- cmake .. --fresh -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/local -Ddompi=${{matrix.mpi}} -Dopenmp=${{matrix.omp}}
157
+ cmake .. --fresh -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/local -Ddompi=${{matrix.mpi}} -Dopenmp=${{matrix.omp}} -Dtests=OFF -Dexamples=OFF
169
158
make -j$(nproc --ignore 1) install
170
159
171
-
172
160
- name : Install
173
161
# Build your program with the given configuration
174
162
run : |
175
163
export CMAKE_PREFIX_PATH=${{github.workspace}}/local:$CMAKE_PREFIX_PATH
176
- #export CMAKE_PREFIX_PATH=${{github.workspace}}/Catch2/build/lib/cmake:$CMAKE_PREFIX_PATH
177
- #export CMAKE_PREFIX_PATH=${{github.workspace}}/sopt/build:$CMAKE_PREFIX_PATH
178
164
mkdir -p ${{github.workspace}}/build
179
165
cd ${{github.workspace}}/build
180
166
cmake .. --fresh -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/local -Ddocasa=OFF -Ddompi=${{matrix.mpi}} -Dopenmp=${{matrix.omp}}
0 commit comments