Skip to content

Commit

Permalink
GitHub workflows: upload artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
wmutschl committed Mar 7, 2024
1 parent f2c4beb commit bb6085e
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/dynare-6.0-matlab-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,16 @@ jobs:
command: |
addpath("Dynare-6.0-arm64/matlab");
run_all_files;
- name: Prepare log files for artifact upload
if: always()
run: |
mkdir 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-macos
path: artifacts/
15 changes: 14 additions & 1 deletion .github/workflows/dynare-6.0-matlab-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,17 @@ jobs:
with:
command: |
addpath("dynare/matlab");
run_all_files;
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/
20 changes: 19 additions & 1 deletion .github/workflows/dynare-6.0-matlab-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,22 @@ jobs:
with:
command: |
addpath("D:\hostedtoolcache\windows\dynare-6.0\matlab");
run_all_files;
run_all_files;
- name: Prepare log files for artifact upload
if: always()
run: |
New-Item -ItemType Directory -Force -Path artifacts
Get-ChildItem -Path . -Filter *.log -Recurse | ForEach-Object {
$destPath = Join-Path -Path "artifacts" -ChildPath $_.DirectoryName.Substring($pwd.Path.Length)
New-Item -ItemType Directory -Force -Path $destPath
Copy-Item -Path $_.FullName -Destination $destPath
}
shell: pwsh

- name: Upload log artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: log-files-dynare-6-0-matlab-r2023b-windows
path: artifacts/

0 comments on commit bb6085e

Please sign in to comment.