Skip to content

Commit

Permalink
Breakage: use upload-artifact v4 (#340)
Browse files Browse the repository at this point in the history
* Breakage: use upload-artifact v4

* try to make artifact names unique

* try to resolve naming conflict

* restore artifact path

* try again

* fix bug

* simplify artifact names

* simplify artifact names

* simplify artifact names

* debug

* debug

* debug

* debug

* debug

* debug

* improve summary table

* fix summary file name
  • Loading branch information
dpo authored Oct 10, 2024
1 parent c92fb0a commit 14f62eb
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 107 deletions.
65 changes: 32 additions & 33 deletions .github/workflows/Breakage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ jobs:
fail-fast: false
matrix:
pkg: [
"JuliaSmoothOptimizers/CaNNOLeS.jl",
"JuliaSmoothOptimizers/DCISolver.jl",
"JuliaSmoothOptimizers/FletcherPenaltySolver.jl",
"JuliaSmoothOptimizers/JSOSolvers.jl",
"JuliaSmoothOptimizers/Krylov.jl",
"JuliaSmoothOptimizers/NLPModels.jl",
"JuliaSmoothOptimizers/NLPModelsModifiers.jl",
"JuliaSmoothOptimizers/Percival.jl",
"JuliaSmoothOptimizers/PROPACK.jl",
"JuliaSmoothOptimizers/QuadraticModels.jl",
"JuliaSmoothOptimizers/SolverTools.jl"
"CaNNOLeS.jl",
"DCISolver.jl",
"FletcherPenaltySolver.jl",
"JSOSolvers.jl",
"Krylov.jl",
"NLPModels.jl",
"NLPModelsModifiers.jl",
"Percival.jl",
"PROPACK.jl",
"QuadraticModels.jl",
"SolverTools.jl"
]
pkgversion: [latest, stable]

Expand All @@ -50,14 +50,13 @@ jobs:
# Breakage test
- name: 'Breakage of ${{ matrix.pkg }}, ${{ matrix.pkgversion }} version'
env:
URL: ${{ matrix.pkg }}
PKG: ${{ matrix.pkg }}
VERSION: ${{ matrix.pkgversion }}
run: |
set -v
mkdir -p ./pr
echo "${{ github.event.number }}" > ./pr/NR
git clone https://github.com/$URL
export PKG=$(echo $URL | cut -f2 -d/)
mkdir -p ./breakage
# echo "${{ github.event.number }}" > ./breakage-$PKG-$VERSION/NR
git clone https://github.com/JuliaSmoothOptimizers/$PKG
cd $PKG
if [ $VERSION == "stable" ]; then
TAG=$(git tag -l "v*" --sort=-creatordate | head -n1)
Expand All @@ -73,7 +72,7 @@ jobs:
julia -e 'using Pkg;
PKG, TAG, VERSION = ENV["PKG"], ENV["TAG"], ENV["VERSION"]
joburl = joinpath(ENV["GITHUB_SERVER_URL"], ENV["GITHUB_REPOSITORY"], "actions/runs", ENV["GITHUB_RUN_ID"])
open("../pr/$PKG-$VERSION", "w") do io
open("../breakage/breakage-$PKG-$VERSION", "w") do io
try
TAG == "no_tag" && error("Not tag for $VERSION")
pkg"activate .";
Expand All @@ -92,34 +91,34 @@ jobs:
end;
end'
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: pr
path: pr/
name: breakage-${{ matrix.pkg }}-${{ matrix.pkgversion }}
path: breakage/breakage-*

upload:
needs: break
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: pr
path: pr/
path: breakage
pattern: breakage-*
merge-multiple: true

- run: ls
- run: ls -R
- run: |
cd pr
echo "| Package name | latest | stable |" > MSG
echo "|--|--|--|" >> MSG
cd breakage
echo "| Package name | latest | stable |" > ../summary.md
echo "|--|--|--|" >> ../summary.md
count=0
for file in *
do
[ "$file" == "NR" ] && continue
[ "$file" == "MSG" ] && continue
if [ $count == "0" ]; then
name=$(echo $file | cut -f1 -d-)
name=$(echo $file | cut -f2 -d-)
echo -n "| $name | "
else
echo -n "| "
Expand All @@ -132,9 +131,9 @@ jobs:
echo " |"
count=0
fi
done >> MSG
done >> ../summary.md
- uses: actions/upload-artifact@v2
- name: PR comment with file
uses: thollander/actions-comment-pull-request@v2
with:
name: pr
path: pr/
filePath: summary.md
74 changes: 0 additions & 74 deletions .github/workflows/CommentPR.yml

This file was deleted.

0 comments on commit 14f62eb

Please sign in to comment.