Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/BuildStatusDataRecorder/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ inputs:
arch-name:
description: "Workflow matrix build arch name"
required: true
branch-name:
description: "Build branch name"
required: true

runs:
using: "composite"
Expand Down Expand Up @@ -83,7 +86,7 @@ runs:
# Record build status data for current workflow.
echo "Proceeding with data recording..."
cp ${DASH_DIR}/record_builds.py .
python record_builds.py --workflow ${{ inputs.workflow-name }} --${{ inputs.record-mode }} --${{ inputs.status }} --run-id ${{ inputs.run-id }} --arch ${{ inputs.arch-name }}
python record_builds.py --workflow ${{ inputs.workflow-name }} --${{ inputs.record-mode }} --${{ inputs.status }} --run-id ${{ inputs.run-id }} --arch ${{ inputs.arch-name }} --branch ${{ inputs.branch-name }}
cp build-status.db ${DASH_DIR}/
rm -f record_builds.py
echo "Removing ${{ inputs.workflow-name }} ${{ inputs.arch-name }} data lock."
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/nightly-musl-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
status: "fail"
run-id: ${{github.run_id}}
arch-name: "x86-64"
branch-name: ${{ github.ref_name }}

- name: Install dependencies
shell: bash
Expand Down Expand Up @@ -110,6 +111,7 @@ jobs:
status: "pass"
run-id: ${{github.run_id}}
arch-name: "x86-64"
branch-name: ${{ github.ref_name }}

test-musl:
strategy:
Expand Down Expand Up @@ -137,6 +139,7 @@ jobs:
status: "fail"
run-id: ${{github.run_id}}
arch-name: ${{ matrix.arch }}
branch-name: ${{ github.ref_name }}

- uses: ./llvm-project/llvm/tools/eld/.github/workflows/FetchNightlyToolset

Expand Down Expand Up @@ -213,3 +216,4 @@ jobs:
status: "pass"
run-id: ${{github.run_id}}
arch-name: ${{ matrix.arch }}
branch-name: ${{ github.ref_name }}
2 changes: 2 additions & 0 deletions .github/workflows/picolibc-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ jobs:
status: "fail"
run-id: ${{github.run_id}}
arch-name: ${{ matrix.arch.name }}
branch-name: ${{ github.ref_name }}

- name: Configure LLVM toolchain for ${{ matrix.arch.name }}
run: |
Expand Down Expand Up @@ -245,3 +246,4 @@ jobs:
status: "pass"
run-id: ${{github.run_id}}
arch-name: ${{ matrix.arch.name }}
branch-name: ${{ github.ref_name }}
28 changes: 16 additions & 12 deletions .github/workflows/scripts/record_builds.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def createBuildDataTables(workflow):
create_table = (
" CREATE TABLE IF NOT EXISTS "
+ workflow
+ " (build_count INTEGER PRIMARY KEY AUTOINCREMENT, run_id INTEGER, state TEXT, build_date TEXT, build_time TEXT, arch TEXT, UNIQUE(run_id, arch));"
+ " (build_count INTEGER PRIMARY KEY AUTOINCREMENT, run_id INTEGER, state TEXT, build_date TEXT, build_time TEXT, arch TEXT, branch TEXT, build_end_time TEXT, UNIQUE(run_id, arch));"
)
try:
cursor.execute(create_table)
Expand All @@ -74,13 +74,14 @@ def addNewBuildData(args):
cursor.execute(
"INSERT INTO "
+ workflow_table
+ " (run_id, state, build_date, build_time, arch) VALUES (?, ?, ?, ?, ?)",
+ " (run_id, state, build_date, build_time, arch, branch) VALUES (?, ?, ?, ?, ?, ?)",
(
args.run_id,
"pass" if args.build_status else "fail",
str(date.today()),
datetime.now().strftime("%H:%M"),
args.workflow_arch,
args.build_branch,
),
)
except Exception as e:
Expand Down Expand Up @@ -170,16 +171,9 @@ def emitJSData(args):
all_data = []
all_states_data = []
try:
if args.workflow_build.lower() == "picolibc":
cursor.execute(
"SELECT run_id, state, build_date, build_time, arch FROM "
+ workflow
+ ";"
)
else:
cursor.execute(
"SELECT run_id, state, build_date, build_time FROM " + workflow + ";"
)
cursor.execute(
"SELECT run_id, state, build_date, build_time, arch, branch FROM " + workflow + ";"
)
all_data = cursor.fetchall()
except Exception as e:
print(
Expand All @@ -194,13 +188,16 @@ def emitJSData(args):
"date": data[2],
"time": data[3],
"arch": data[4],
"branch": data[5],
}
else:
new_state = {
"run_id": str(data[0]),
"state": data[1],
"date": data[2],
"time": data[3],
"arch": data[4],
"branch": data[5],
}
all_states_data.append(new_state)

Expand Down Expand Up @@ -239,6 +236,13 @@ def handleArguments():
required=False,
help="The workflow build architecture name.",
)
parser.add_argument(
"--branch",
"-b",
dest="build_branch",
required=False,
help="The build branch name.",
)
parser.add_argument(
"--run-id", dest="run_id", required=False, help="The github workflow run ID."
)
Expand Down
Loading