Born_Pfeifer_2018_welfare.mod: fix mistake in composite target #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Dynare 6.0 with MATLAB R2023b on Ubuntu ' | |
on: | |
push: | |
branches: | |
- main | |
- master | |
workflow_dispatch: | |
jobs: | |
dynare_6_0_matlab_r2023b_ubuntu: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Add console option to Dynare calls in run_all_files | |
run: | | |
sed -i -e '/^ dynare/ s/$/ console/' run_all_files.m | |
- name: Set up MATLAB | |
uses: matlab-actions/setup-matlab@v2 | |
with: | |
release: R2023b | |
products: Symbolic_Math_Toolbox Statistics_and_Machine_Learning_Toolbox Optimization_Toolbox Econometrics_Toolbox Parallel_Computing_Toolbox Control_System_Toolbox Global_Optimization_Toolbox | |
cache: true | |
- name: Rename libraries and fix issues (as in matlab-support package) | |
run: | | |
if [ -f "/opt/hostedtoolcache/MATLAB/2023.2.999/x64/sys/os/glnxa64/libgcc_s.so.1" ]; then \ | |
mv /opt/hostedtoolcache/MATLAB/2023.2.999/x64/sys/os/glnxa64/libgcc_s.so.1 /opt/hostedtoolcache/MATLAB/2023.2.999/x64/sys/os/glnxa64/libgcc_s.so.1.bak; \ | |
fi | |
if [ -f "/opt/hostedtoolcache/MATLAB/2023.2.999/x64/sys/os/glnxa64/libstdc++.so.6" ]; then \ | |
mv /opt/hostedtoolcache/MATLAB/2023.2.999/x64/sys/os/glnxa64/libstdc++.so.6 /opt/hostedtoolcache/MATLAB/2023.2.999/x64/sys/os/glnxa64/libstdc++.so.6.bak; \ | |
fi | |
if [ -f "/opt/hostedtoolcache/MATLAB/2023.2.999/x64/sys/os/glnxa64/libgfortran.so.5" ]; then \ | |
mv /opt/hostedtoolcache/MATLAB/2023.2.999/x64/sys/os/glnxa64/libgfortran.so.5 /opt/hostedtoolcache/MATLAB/2023.2.999/x64/sys/os/glnxa64/libgfortran.so.5.bak; \ | |
fi | |
if [ -f "/opt/hostedtoolcache/MATLAB/2023.2.999/x64/sys/os/glnxa64/libquadmath.so.0" ]; then \ | |
mv /opt/hostedtoolcache/MATLAB/2023.2.999/x64/sys/os/glnxa64/libquadmath.so.0 /opt/hostedtoolcache/MATLAB/2023.2.999/x64/sys/os/glnxa64/libquadmath.so.0.bak; \ | |
fi | |
if [ -f "/opt/hostedtoolcache/MATLAB/2023.2.999/x64/bin/glnxa64/libfreetype.so.6" ]; then \ | |
mv /opt/hostedtoolcache/MATLAB/2023.2.999/x64/bin/glnxa64/libfreetype.so.6 /opt/hostedtoolcache/MATLAB/2023.2.999/x64/bin/glnxa64/libfreetype.so.6.bak; \ | |
fi | |
if [ -f "/opt/hostedtoolcache/MATLAB/2023.2.999/x64/bin/glnxa64/libtiff.so.5" ]; then \ | |
mv /opt/hostedtoolcache/MATLAB/2023.2.999/x64/bin/glnxa64/libtiff.so.5 /opt/hostedtoolcache/MATLAB/2023.2.999/x64/bin/glnxa64/libtiff.so.5.bak; \ | |
fi | |
- name: Install dependencies for Dynare | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y gcc g++ meson pkgconf python3-pip gfortran \ | |
libboost-graph-dev libgsl-dev libmatio-dev libslicot-dev libslicot-pic \ | |
libsuitesparse-dev flex libfl-dev bison texlive texlive-publishers \ | |
texlive-latex-extra texlive-fonts-extra texlive-font-utils texlive-latex-recommended \ | |
texlive-science texlive-plain-generic lmodern python3-sphinx tex-gyre latexmk \ | |
libjs-mathjax x13as liboctave-dev octave-control octave-econometrics octave-io \ | |
octave-statistics octave-struct octave-parallel gnuplot fonts-freefont-otf \ | |
ghostscript epstool git git-lfs | |
- name: Compile Dynare | |
run: | | |
git clone --depth 1 --branch 6.0 --recurse-submodules https://git.dynare.org/dynare/dynare.git | |
cd dynare | |
pip3 install meson==1.3.1 | |
export PATH="/home/matlab/.local/bin:${PATH}" | |
meson setup -Dmatlab_path=/opt/hostedtoolcache/MATLAB/2023.2.999/x64 -Dbuildtype=debugoptimized build-matlab | |
meson compile -C build-matlab | |
cd .. | |
- name: run_all_files | |
uses: matlab-actions/run-command@v2 | |
with: | |
command: | | |
addpath("dynare/matlab"); | |
run_all_files; | |
- name: Prepare log files for artifact upload | |
if: always() | |
run: | | |
mkdir -p artifacts | |
find . -name '*.log' -exec bash -c 'mkdir -p artifacts/$(dirname {}); cp {} artifacts/{};' \; | |
- name: Upload log artifacts | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: log-files-dynare-6-0-matlab-r2023b-ubuntu | |
path: artifacts/ |