Skip to content

Commit cd54ae6

Browse files
Merge pull request #330 from stackql/dev
aot-v2-0-1
2 parents 1399361 + 23def57 commit cd54ae6

File tree

4 files changed

+74
-5
lines changed

4 files changed

+74
-5
lines changed

.github/workflows/aot.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,11 @@ jobs:
105105
providerID="$(basename "${subdir}")"
106106
echo "Processing provider '${providerID}' at subdirectory: '${subdir}'" 1>&2
107107
echo ""
108-
./scripts/cicd/shell/aot-analysis/01-aot-analysis-compact.sh ${{ github.workspace }}/stackql-any-sdk/build/anysdk "${providerID}" "${subdir}/v00.00.00000/provider.yaml" &
109-
echo ""
108+
for line in $(${{ github.workspace }}/stackql-any-sdk/build/anysdk interrogate services ${{ github.workspace }}/providers ${subdir}/v00.00.00000/provider.yaml); do
109+
serviceIdentifier="${line}"
110+
./scripts/cicd/shell/aot-analysis/01-aot-analysis-compact.sh ${{ github.workspace }}/stackql-any-sdk/build/anysdk "${providerID}" "${subdir}/v00.00.00000/provider.yaml" "${serviceIdentifier}" &
111+
echo ""
112+
done
110113
done
111114
echo ""
112115
echo "All tasks initiated. Waiting for them to complete..."
@@ -138,7 +141,7 @@ jobs:
138141
139142
- name: Upload AOT analysis logs
140143
uses: actions/[email protected]
141-
if: success()
144+
if: always()
142145
with:
143146
name: aot_analysis_logs
144147
path: ./test/log

scripts/cicd/shell/aot-analysis/01-aot-analysis-compact.sh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,24 @@ providerID="${2}"
1010

1111
providerRootFile="${3}"
1212

13+
serviceIdentifier="${4}"
14+
1315
logDir="${REPOSITORY_ROOT}/test/log"
1416

1517
registryDir="${REPOSITORY_ROOT}/providers"
1618

17-
${anySdkExe} aot "${registryDir}" "${providerRootFile}" -v > "${logDir}/aot_${providerID}.log" 2>&1
19+
if [ "${serviceIdentifier}" != "" ]; then
20+
${anySdkExe} aot "${registryDir}" "${providerRootFile}" "${serviceIdentifier}" -v > "${logDir}/aot_${providerID}_${serviceIdentifier}.log" 2>&1
21+
else
22+
${anySdkExe} aot "${registryDir}" "${providerRootFile}" -v > "${logDir}/aot_${providerID}.log" 2>&1
23+
fi
1824

1925
rc="$?"
2026

21-
echo "${rc}" > "${logDir}/rc_aot_${providerID}.txt"
27+
if [ "${serviceIdentifier}" != "" ]; then
28+
echo "${rc}" > "${logDir}/rc_aot_${providerID}_${serviceIdentifier}.txt"
29+
echo "${SECONDS}" > "${logDir}/duration_seconds_aot_${providerID}_${serviceIdentifier}.txt"
30+
else
31+
echo "${rc}" > "${logDir}/rc_aot_${providerID}.txt"
32+
echo "${SECONDS}" > "${logDir}/duration_seconds_aot_${providerID}.txt"
33+
fi
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/usr/bin/env bash
2+
3+
CUR_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
4+
5+
REPOSITORY_ROOT="$(realpath "${CUR_DIR}/../../../..")"
6+
7+
anySdkCliPath="${1}"
8+
9+
for sd in ${REPOSITORY_ROOT}/providers/src/*/ ; do
10+
echo ""
11+
subdir="$(realpath "${sd}")"
12+
providerID="$(basename "${subdir}")"
13+
echo "Processing provider '${providerID}' at subdirectory: '${subdir}'" 1>&2
14+
echo ""
15+
for line in $(${anySdkCliPath} interrogate services ${REPOSITORY_ROOT}/providers ${subdir}/v00.00.00000/provider.yaml); do
16+
serviceIdentifier="${line}"
17+
${REPOSITORY_ROOT}/scripts/cicd/shell/aot-analysis/01-aot-analysis-compact.sh ${anySdkCliPath} "${providerID}" "${subdir}/v00.00.00000/provider.yaml" "${serviceIdentifier}" &
18+
echo ""
19+
done
20+
done
21+
22+
echo ""
23+
echo "All tasks initiated. Waiting for them to complete..." 1>&2
24+
echo ""
25+
26+
wait
27+
28+
echo ""
29+
echo "All tasks completed." 1>&2
30+
echo ""
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env bash
2+
3+
CUR_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
4+
5+
REPOSITORY_ROOT="$(realpath "${CUR_DIR}/../../../..")"
6+
7+
8+
rc='0'
9+
10+
for rcf in ${REPOSITORY_ROOT}/test/log/rc_* ; do
11+
thisrc="$(cat "${rcf}")"
12+
if [ "$thisrc" != "0" ]; then
13+
echo "AOT analysis failure detected for: '${rcf}'" 1>&2
14+
rc='1'
15+
fi
16+
done
17+
18+
if [ "$rc" != "0" ]; then
19+
echo "AOT analysis failures detected." 1>&2
20+
exit 1
21+
fi
22+
23+
echo "All AOT analysis tasks completed successfully." 1>&2
24+

0 commit comments

Comments
 (0)