Skip to content

Added week 9 material #41

Added week 9 material

Added week 9 material #41

name: 'Ubuntu '
on:
push:
branches:
- 'main'
workflow_dispatch:
jobs:
dynare_6_0_matlab_r2024a_ubuntu:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v2
with:
release: R2024a
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/2024.1.999/x64/sys/os/glnxa64/libgcc_s.so.1" ]; then \
mv /opt/hostedtoolcache/MATLAB/2024.1.999/x64/sys/os/glnxa64/libgcc_s.so.1 /opt/hostedtoolcache/MATLAB/2024.1.999/x64/sys/os/glnxa64/libgcc_s.so.1.bak; \
fi
if [ -f "/opt/hostedtoolcache/MATLAB/2024.1.999/x64/sys/os/glnxa64/libstdc++.so.6" ]; then \
mv /opt/hostedtoolcache/MATLAB/2024.1.999/x64/sys/os/glnxa64/libstdc++.so.6 /opt/hostedtoolcache/MATLAB/2024.1.999/x64/sys/os/glnxa64/libstdc++.so.6.bak; \
fi
if [ -f "/opt/hostedtoolcache/MATLAB/2024.1.999/x64/sys/os/glnxa64/libgfortran.so.5" ]; then \
mv /opt/hostedtoolcache/MATLAB/2024.1.999/x64/sys/os/glnxa64/libgfortran.so.5 /opt/hostedtoolcache/MATLAB/2024.1.999/x64/sys/os/glnxa64/libgfortran.so.5.bak; \
fi
if [ -f "/opt/hostedtoolcache/MATLAB/2024.1.999/x64/sys/os/glnxa64/libquadmath.so.0" ]; then \
mv /opt/hostedtoolcache/MATLAB/2024.1.999/x64/sys/os/glnxa64/libquadmath.so.0 /opt/hostedtoolcache/MATLAB/2024.1.999/x64/sys/os/glnxa64/libquadmath.so.0.bak; \
fi
if [ -f "/opt/hostedtoolcache/MATLAB/2024.1.999/x64/bin/glnxa64/libfreetype.so.6" ]; then \
mv /opt/hostedtoolcache/MATLAB/2024.1.999/x64/bin/glnxa64/libfreetype.so.6 /opt/hostedtoolcache/MATLAB/2024.1.999/x64/bin/glnxa64/libfreetype.so.6.bak; \
fi
if [ -f "/opt/hostedtoolcache/MATLAB/2024.1.999/x64/bin/glnxa64/libtiff.so.5" ]; then \
mv /opt/hostedtoolcache/MATLAB/2024.1.999/x64/bin/glnxa64/libtiff.so.5 /opt/hostedtoolcache/MATLAB/2024.1.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: |
export GIT_CLONE_PROTECTION_ACTIVE=false
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/2024.1.999/x64 -Dbuildtype=debugoptimized build-matlab
meson compile -C build-matlab
cd ..
- name: Run week 1 codes
uses: matlab-actions/run-command@v2
with:
command: |
addpath("dynare/matlab");
cd("progs/matlab");
quickTourMatlab;
cd("../dynare");
dynare arma11 console
cd("../matlab");
arma11CompareMATLABWithDynare;
- name: Run week 2 codes
uses: matlab-actions/run-command@v2
with:
command: |
addpath("dynare/matlab");
cd("progs/matlab");
rbcLogutilSteadyStateTest;
cd("../dynare");
dynare rbcLogutil console
cd("../matlab");
rbcCRRASteadyStateTest;
cd("../dynare");
dynare rbcCRRA console
dynare BaxterKingSteadyState console
dynare BaxterKingGrowthSteadyState console
cd("../replications/Baxter_King_1993");
dynare Baxter_King_1993_figure_2 console
- name: Run week 3 codes
uses: matlab-actions/run-command@v2
with:
command: |
addpath("dynare/matlab");
cd("progs/replications/Baxter_King_1993");
dynare Baxter_King_1993_figure_3 console
cd("../../matlab")
symbolicToolboxIllustation;
matrixAlgebraEigenvalues;
matrixAlgebraKroneckerFormula;
matrixAlgebraCholesky;
matrixAlgebraCompareLyapunovSolvers;
preprocessingComparisonRBC;
- name: Run week 4 codes
uses: matlab-actions/run-command@v2
with:
command: |
addpath("dynare/matlab");
cd("progs/dynare");
dynare nk console
- name: Run week 5 codes
uses: matlab-actions/run-command@v2
with:
command: |
addpath("dynare/matlab");
cd("progs/matlab");
numericalOptimizationExamples;
steadystateRBC;
- name: Run week 7 codes
uses: matlab-actions/run-command@v2
with:
command: |
addpath("dynare/matlab");
cd("progs/dynare");
dynare nk2co_common console
dynare nk2co_temp_monpol_surprise console
dynare nk2co_temp_monpol_announced console
dynare nk2co_perm_infltarget_surprise console
dynare nk2co_perm_tax_announced console
nk2co_understand_perfect_foresight;
- name: Run week 8 codes
uses: matlab-actions/run-command@v2
with:
command: |
addpath("dynare/matlab");
cd("progs/replications/Eichenbaum_Rebelo_Trabandt_2022");
dynare ert_model_sticky_steady console
dynare ert_model_initval console
dynare ert_model_histval console
dynare ert_model_no_homotopy console
dynare ert_model_homotopy console
dynare ert_model_figures_demand console
dynare ert_model_figures_supply console
dynare ert_model_figures_both console