Skip to content

Commit

Permalink
Started new course in winter 2024/25
Browse files Browse the repository at this point in the history
  • Loading branch information
wmutschl committed Oct 14, 2024
1 parent 5d19618 commit f5ac4a3
Show file tree
Hide file tree
Showing 34 changed files with 831 additions and 1,261 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/dynare-6.2-matlab-r2024b-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: 'macOS '

on:
push:
branches:
- main
workflow_dispatch:

jobs:
dynare_6_2_matlab_r2024b_macos:
runs-on: macos-latest
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v2
with:
release: R2024b
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: Download Dynare .pkg for macOS ARM64
run: |
curl -L "https://www.dynare.org/release/macos-arm64/dynare-6.2-arm64.pkg" -o "dynare-6.2-arm64.pkg"
shell: bash

- name: Install Dynare from the .pkg file (without sudo)
run: |
pkgutil --expand dynare-6.2-arm64.pkg Dynare-6.2-arm64
cd Dynare-6.2-arm64/dynare-6.2-arm64.pkg/
tar -zxvf Payload -C ../
ls
cd ..
cd ..
shell: bash

- name: Run week 1 codes
uses: matlab-actions/run-command@v2
with:
command: |
addpath("Dynare-6.2-arm64/matlab");
cd("progs/matlab");
quickTourMatlab;
73 changes: 73 additions & 0 deletions .github/workflows/dynare-6.2-matlab-r2024b-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: 'Ubuntu '

on:
push:
branches:
- 'main'
workflow_dispatch:

jobs:
dynare_6_2_matlab_r2024b_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: R2024b
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.2.999/x64/sys/os/glnxa64/libgcc_s.so.1" ]; then \
mv /opt/hostedtoolcache/MATLAB/2024.2.999/x64/sys/os/glnxa64/libgcc_s.so.1 /opt/hostedtoolcache/MATLAB/2024.2.999/x64/sys/os/glnxa64/libgcc_s.so.1.bak; \
fi
if [ -f "/opt/hostedtoolcache/MATLAB/2024.2.999/x64/sys/os/glnxa64/libstdc++.so.6" ]; then \
mv /opt/hostedtoolcache/MATLAB/2024.2.999/x64/sys/os/glnxa64/libstdc++.so.6 /opt/hostedtoolcache/MATLAB/2024.2.999/x64/sys/os/glnxa64/libstdc++.so.6.bak; \
fi
if [ -f "/opt/hostedtoolcache/MATLAB/2024.2.999/x64/sys/os/glnxa64/libgfortran.so.5" ]; then \
mv /opt/hostedtoolcache/MATLAB/2024.2.999/x64/sys/os/glnxa64/libgfortran.so.5 /opt/hostedtoolcache/MATLAB/2024.2.999/x64/sys/os/glnxa64/libgfortran.so.5.bak; \
fi
if [ -f "/opt/hostedtoolcache/MATLAB/2024.2.999/x64/sys/os/glnxa64/libquadmath.so.0" ]; then \
mv /opt/hostedtoolcache/MATLAB/2024.2.999/x64/sys/os/glnxa64/libquadmath.so.0 /opt/hostedtoolcache/MATLAB/2024.2.999/x64/sys/os/glnxa64/libquadmath.so.0.bak; \
fi
if [ -f "/opt/hostedtoolcache/MATLAB/2024.2.999/x64/bin/glnxa64/libfreetype.so.6" ]; then \
mv /opt/hostedtoolcache/MATLAB/2024.2.999/x64/bin/glnxa64/libfreetype.so.6 /opt/hostedtoolcache/MATLAB/2024.2.999/x64/bin/glnxa64/libfreetype.so.6.bak; \
fi
if [ -f "/opt/hostedtoolcache/MATLAB/2024.2.999/x64/bin/glnxa64/libtiff.so.5" ]; then \
mv /opt/hostedtoolcache/MATLAB/2024.2.999/x64/bin/glnxa64/libtiff.so.5 /opt/hostedtoolcache/MATLAB/2024.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: |
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone --depth 1 --branch 6.2 --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.2.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;
36 changes: 36 additions & 0 deletions .github/workflows/dynare-6.2-matlab-r2024b-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: 'Windows '

on:
push:
branches:
- main
workflow_dispatch:

jobs:
dynare_6_0_matlab_r2024a_windows:
runs-on: windows-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: Download and unzip Dynare 6.0
run: |
curl -L "https://www.dynare.org/release/windows-zip/dynare-6.0-win.zip" -o "dynare-6.0-win.zip"
Expand-Archive -Path "dynare-6.0-win.zip" -DestinationPath "D:\hostedtoolcache\windows"
shell: pwsh

- name: Run week 1 codes
uses: matlab-actions/run-command@v2
with:
command: |
addpath("D:\hostedtoolcache\windows\dynare-6.0\matlab");
cd("progs/matlab");
quickTourMatlab;
20 changes: 10 additions & 10 deletions .github/workflows/latex.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
name: Build LaTeX
name: LaTeX

on:
push:
branches:
- main
tags:
- 'v*.*'

- '2024-week-*'
- '2025-week-*'
workflow_dispatch:

jobs:
build_documents:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v3
- name: Set up Git repository
uses: actions/checkout@v4

- name: Compile LaTeX exercises
uses: xu-cheng/latex-action@v3
with:
root_file: "week*.tex"
work_in_root_file_dir: true

- name: Compile LaTeX exams
uses: xu-cheng/latex-action@v3
with:
root_file: "exam/*_exam_*.tex"
root_file: "exam/*_exam_*.tex"
work_in_root_file_dir: true

- name: Compile LaTeX slides
uses: xu-cheng/latex-action@v3
with:
root_file: "slides/*.tex"
root_file: "slides/*.tex"
work_in_root_file_dir: true

- name: Create Release
if: startsWith(github.ref, 'refs/tags/v')
if: startsWith(github.ref, 'refs/tags/2024-week-') || startsWith(github.ref, 'refs/tags/2025-week-')
uses: ncipollo/release-action@v1
with:
artifacts: "week*.pdf, exam/*_exam_*.pdf, slides/slides_*.pdf"
Expand Down
114 changes: 0 additions & 114 deletions .github/workflows/matlab.yml

This file was deleted.

56 changes: 15 additions & 41 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,51 +1,25 @@
*.aux
*.bbl
*.bcf
*.blg
*.fdb_latexmk
*.fls
*.xml
*.gz
*.toc
common_header.log
.vscode/settings.json

.aux/
.not_yet/
.vscode/
class/
exam/winter-2022
exam/winter-2023
exam/winter-*
literature/*.pdf
stuff/

common_header.log

*_exam_*.log
*_exam_*.out
*_exam_*.pdf
*_exam_*_solution.tex

slides/*.log
slides/*.nav
slides/*.out
slides/*.pdf
slides/*.snm

week_*.log
week_*.out
week_*.pdf
week_*_solution.tex
progs/matlab/BVARZLB_results_noZLB.log

progs/matlab/BVARZLB_results_withZLB.log

progs/dynare/\+rbcCES/

progs/dynare/\+rbcLogutil/

progs/dynare/rbcCES/

progs/dynare/rbcLogutil/

progs/dynare/rbcCES.log
*_exam_*.log
*_exam_*.out
*_exam_*.pdf

progs/dynare/rbcLogutil.log
*.aux
*.bbl
*.bcf
*.blg
*.fdb_latexmk
*.fls
*.xml
*.gz
*.toc
Loading

0 comments on commit f5ac4a3

Please sign in to comment.