Skip to content

Commit 7b569b5

Browse files
authored
ci: fix download path for cuda ci (#1576)
1 parent 3dfbd0b commit 7b569b5

File tree

1 file changed

+70
-1
lines changed

1 file changed

+70
-1
lines changed

.github/workflows/Documentation.yml

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,47 @@ jobs:
6565
output_path: artifacts
6666
poll_interval: 30
6767

68+
- name: "Combine CUDA Tutorial Artifacts"
69+
run: |
70+
set -e
71+
72+
SOURCE_DIR="artifacts"
73+
OUTPUT_DIR="artifacts_combined"
74+
75+
mkdir -p "$OUTPUT_DIR"
76+
77+
# Check if source directory exists
78+
if [ ! -d "$SOURCE_DIR" ]; then
79+
echo "Error: Source directory '$SOURCE_DIR' not found"
80+
exit 1
81+
fi
82+
83+
BUILD_DIRS=$(find "$SOURCE_DIR" -mindepth 1 -type d -name "Tutorial-Build-*")
84+
85+
[ -n "$BUILD_DIRS" ] || { echo "Error: No Tutorial-Build directories found"; exit 1; }
86+
87+
echo "$BUILD_DIRS" | while read dir; do
88+
echo "Processing: $dir"
89+
rsync -av --ignore-existing "$dir/" "$OUTPUT_DIR/"
90+
done
91+
92+
# Verify
93+
[ "$(ls -A $OUTPUT_DIR)" ] || { echo "Error: Merge produced empty directory"; exit 1; }
94+
95+
echo "✓ Merge complete!"
96+
shell: bash
97+
6898
- name: Upload Tutorial Artifacts
6999
uses: actions/upload-artifact@v5
70100
with:
71101
name: "tutorial-cuda"
72-
path: artifacts/**/*
102+
path: |
103+
artifacts_combined/docs/src/tutorials/beginner/**/*
104+
artifacts_combined/docs/src/tutorials/intermediate/**/*
105+
artifacts_combined/docs/src/tutorials/advanced/**/*
106+
artifacts_combined/tutorial_deps/*
107+
artifacts_combined/**/*.cov
108+
artifacts_combined/docs/src/public/examples/**/*
73109
retention-days: 90
74110
if-no-files-found: error
75111

@@ -150,6 +186,39 @@ jobs:
150186
env:
151187
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
152188

189+
- name: "Generate coverage"
190+
run: |
191+
using Pkg
192+
Pkg.activate("coveragetempenv", shared=true)
193+
194+
Pkg.add(PackageSpec(name="CoverageTools"))
195+
196+
using CoverageTools
197+
198+
projectdirs = ["."]
199+
isdir("lib") && append!(projectdirs, readdir("lib/"; join=true))
200+
201+
directories = []
202+
for projectdir in projectdirs
203+
if isdir(joinpath(projectdir, "src"))
204+
push!(directories, joinpath(projectdir, "src"))
205+
end
206+
if isdir(joinpath(projectdir, "ext"))
207+
push!(directories, joinpath(projectdir, "ext"))
208+
end
209+
end
210+
filter!(isdir, directories)
211+
212+
pfs = mapreduce(process_folder, vcat, directories)
213+
LCOV.writefile("lcov.info", pfs)
214+
shell: julia --color=yes --threads=auto {0}
215+
- uses: codecov/codecov-action@v5
216+
with:
217+
files: lcov.info
218+
token: ${{ secrets.CODECOV_TOKEN }}
219+
verbose: true
220+
fail_ci_if_error: false
221+
153222
env:
154223
JULIA_DEBUG: "Documenter,Reactant,Reactant_jll,Lux"
155224
DATADEPS_ALWAYS_ACCEPT: true

0 commit comments

Comments
 (0)