Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
13 changes: 8 additions & 5 deletions .github/workflows/__build-mode-autobuild.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions pr-checks/checks/build-mode-autobuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ description: "An end-to-end integration test of a Java repository built using 'b
operatingSystems: ["ubuntu", "windows"]
versions: ["linked", "nightly-latest"]
installJava: "true"
installYq: "true"
steps:
- name: Set up Java test repo configuration
run: |
Expand All @@ -18,11 +19,6 @@ steps:
languages: java
tools: ${{ steps.prepare-test.outputs.tools-url }}

- name: Install yq
if: runner.os == 'Windows'
run: |
choco install yq -y

- name: Validate database build mode
run: |
metadata_path="$RUNNER_TEMP/customDbLocation/java/codeql-database.yml"
Expand Down
21 changes: 20 additions & 1 deletion pr-checks/sync.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python

import ruamel.yaml
from ruamel.yaml.scalarstring import SingleQuotedScalarString
from ruamel.yaml.scalarstring import SingleQuotedScalarString, LiteralScalarString
import pathlib
import os

Expand Down Expand Up @@ -223,6 +223,25 @@ def writeHeader(checkStream):
}
})

installYq = is_truthy(checkSpecification.get('installYq', ''))

if installYq:
steps.append({
'name': 'Install yq',
'if': "runner.os == 'Windows'",
'env': {
'YQ_PATH': '${{ runner.temp }}/yq',
# This is essentially an arbitrary version of `yq`, which happened to be the one that
# `choco` fetched when we moved away from using that here.
# See https://github.com/github/codeql-action/pull/3423
'YQ_VERSION': 'v4.50.1'
},
'run': LiteralScalarString(
'gh release download --repo mikefarah/yq --pattern "yq_windows_amd64.exe" "$YQ_VERSION" -O "$YQ_PATH/yq.exe"\n'
'echo "$YQ_PATH" >> "$GITHUB_PATH"'
),
})

# If container initialisation steps are present in the check specification,
# make sure to execute them first.
if 'container' in checkSpecification and 'container-init-steps' in checkSpecification:
Expand Down
Loading