Skip to content

Commit dbd7c55

Browse files
committed
Merge branch 'main' into 478-dev-scalar-vs-dim-one
2 parents 110e613 + bfaa0e9 commit dbd7c55

File tree

1 file changed

+11
-129
lines changed

1 file changed

+11
-129
lines changed
+11-129
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Ref: https://securitylab.github.com/research/github-actions-preventing-pwn-requests
2-
name: BreakageApplication
2+
name: Breakage Application
33

44
# read-only repo token
55
# no access to secrets
@@ -9,136 +9,18 @@ on:
99

1010
jobs:
1111
break:
12-
runs-on: ubuntu-latest
1312
if: contains(github.event.pull_request.labels.*.name, 'run breakage applications')
1413
strategy:
1514
fail-fast: false
1615
matrix:
17-
pkg: [
18-
"control-toolbox/CalculusOfVariations.jl",
19-
"control-toolbox/LossControl.jl",
20-
"control-toolbox/GeometricPreconditioner.jl",
21-
"control-toolbox/MedicalResonanceImaging.jl",
22-
"control-toolbox/Kepler.jl"
23-
]
16+
pkgname: [CalculusOfVariations, LossControl, GeometricPreconditioner, MedicalResonanceImaging, Kepler, PWLdynamics]
2417
pkgversion: [latest, stable]
25-
26-
steps:
27-
- uses: actions/checkout@v4
28-
29-
# Install Julia
30-
- uses: julia-actions/setup-julia@latest
31-
with:
32-
version: 1
33-
arch: x64
34-
- uses: actions/cache@v1
35-
env:
36-
cache-name: cache-artifacts
37-
with:
38-
path: ~/.julia/artifacts
39-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
40-
restore-keys: |
41-
${{ runner.os }}-test-${{ env.cache-name }}-
42-
${{ runner.os }}-test-
43-
${{ runner.os }}-
44-
- uses: julia-actions/julia-buildpkg@v1
45-
46-
# Breakage test
47-
- name: 'Breakage of ${{ matrix.pkg }}, ${{ matrix.pkgversion }} version'
48-
env:
49-
URL: ${{ matrix.pkg }}
50-
VERSION: ${{ matrix.pkgversion }}
51-
run: |
52-
set -v
53-
mkdir -p ./pr
54-
echo "${{ github.event.number }}" > ./pr/NR
55-
#
56-
PKG_SRC_PATH=`pwd`
57-
PKG_SRC_NAME=`basename -s ".jl" $PKG_SRC_PATH`
58-
#
59-
git clone https://github.com/$URL
60-
export PKG=$(echo $URL | cut -f2 -d/)
61-
cd $PKG
62-
if [ $VERSION == "stable" ]; then
63-
TAG=$(git tag -l "v*" --sort=-creatordate | head -n1)
64-
if [ -z "$TAG" ]; then
65-
TAG="no_tag"
66-
else
67-
git checkout $TAG
68-
fi
69-
else
70-
TAG=$VERSION
71-
fi
72-
export TAG
73-
#
74-
PKG_SRC_VERSION=$(julia --project=docs/ -e 'using Pkg, Logging; with_logger(NullLogger()) do; Pkg.instantiate(); Pkg.installed()["'$PKG_SRC_NAME'"] |> println; end')
75-
export PKG_SRC_VERSION
76-
#
77-
julia -e 'using Pkg;
78-
PKG, TAG, VERSION, PKG_SRC_VERSION = ENV["PKG"], ENV["TAG"], ENV["VERSION"], ENV["PKG_SRC_VERSION"]
79-
joburl = joinpath(ENV["GITHUB_SERVER_URL"], ENV["GITHUB_REPOSITORY"], "actions/runs", ENV["GITHUB_RUN_ID"])
80-
open("../pr/$PKG-$VERSION", "w") do io
81-
try
82-
TAG == "no_tag" && error("Not tag for $VERSION")
83-
pkg"activate docs";
84-
pkg"instantiate";
85-
pkg"status";
86-
pkg"dev ../";
87-
pkg"build";
88-
include("docs/make.jl");
89-
90-
print(io, "[![](https://img.shields.io/badge/$TAG-Pass-green)]($joburl) compat: v", PKG_SRC_VERSION);
91-
catch e
92-
@error e;
93-
print(io, "[![](https://img.shields.io/badge/$TAG-Fail-red)]($joburl) compat: v", PKG_SRC_VERSION);
94-
end;
95-
end'
96-
97-
- uses: actions/upload-artifact@v3
98-
with:
99-
name: pr
100-
path: pr/
101-
102-
upload:
103-
needs: break
104-
runs-on: ubuntu-latest
105-
steps:
106-
- uses: actions/checkout@v3
107-
108-
- uses: actions/download-artifact@v3
109-
with:
110-
name: pr
111-
path: pr/
112-
113-
- run: ls
114-
- run: |
115-
cd pr
116-
echo "Breakage test results" > MSG
117-
echo "Date: $(TZ=UTC-2 date '+%Y-%m-%d %H:%M:%S')" >> MSG
118-
echo "| Application name | latest | stable |" >> MSG
119-
echo "|--|--|--|" >> MSG
120-
count=0
121-
for file in *
122-
do
123-
[ "$file" == "NR" ] && continue
124-
[ "$file" == "MSG" ] && continue
125-
if [ $count == "0" ]; then
126-
name=$(echo $file | sed 's|\(.*\)-.*|\1|')
127-
echo -n "| $name | "
128-
else
129-
echo -n "| "
130-
fi
131-
cat $file
132-
if [ $count == "0" ]; then
133-
echo -n " "
134-
count=1
135-
else
136-
echo " |"
137-
count=0
138-
fi
139-
done >> MSG
140-
141-
- uses: actions/upload-artifact@v3
142-
with:
143-
name: pr
144-
path: pr/
18+
include:
19+
- pkgpath: control-toolbox
20+
- pkgpath: agustinyabo
21+
pkgname: PWLdynamics
22+
uses: control-toolbox/CTActions/.github/workflows/breakage-application.yml@main
23+
with:
24+
pkgname: ${{ matrix.pkgname }}
25+
pkgpath: ${{ matrix.pkgpath }}
26+
pkgversion: ${{ matrix.pkgversion }}

0 commit comments

Comments
 (0)