Skip to content

Commit

Permalink
ci(linux): fix libssl installation causing runner to restart
Browse files Browse the repository at this point in the history
This should be reverted once the core issue has been resolved: actions/runner-images#9937
  • Loading branch information
Silverlan committed May 28, 2024
1 parent 97bb496 commit 8802e21
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
uses: ./pragma/github_actions/build
id: build-pragma
with:
build-args: "--with-pfm --with-all-pfm-modules --with-vr --with-lua-debugger=0"
build-args: "--with-pfm --with-all-pfm-modules --with-vr --with-lua-debugger=0 --no-libssl"

#- name: Handle Error
# uses: Silverlan/common_actions/action_handle_error@main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pragma-linux-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
uses: ./pragma/github_actions/build
id: build-pragma
with:
build-args: "--with-pfm --with-all-pfm-modules --with-vr --with-networking --with-lua-debugger=0"
build-args: "--with-pfm --with-all-pfm-modules --with-vr --with-networking --with-lua-debugger=0 --no-libssl"

- name: Create Release Archive
shell: bash
Expand Down
14 changes: 9 additions & 5 deletions build_scripts/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
if platform == "linux":
parser.add_argument("--no-sudo", type=str2bool, nargs='?', const=True, default=False, help="Will not run sudo commands. System packages will have to be installed manually.")
parser.add_argument("--no-confirm", type=str2bool, nargs='?', const=True, default=False, help="Disable any interaction with user (suitable for automated run).")
parser.add_argument("--no-libssl", type=str2bool, nargs='?', const=True, default=False, help="Disable the installation of the libssl-dev package.")
args,unknown = parser.parse_known_args()
args = vars(args)
input_args = args
Expand Down Expand Up @@ -86,6 +87,7 @@
cxx_compiler = args["cxx_compiler"]
no_sudo = args["no_sudo"]
no_confirm = args["no_confirm"]
no_libssl = args["no_libssl"]
generator = args["generator"]
#if platform == "win32":
# vcvars = args["vcvars
Expand Down Expand Up @@ -142,6 +144,7 @@
if platform == "linux":
print("no_sudo: " +str(no_sudo))
print("no_confirm: " +str(no_confirm))
print("no_libssl: " +str(no_libssl))
print("cmake_args: " +', '.join(additional_cmake_args))
print("modules: " +', '.join(modules))

Expand Down Expand Up @@ -254,11 +257,6 @@ def execscript(filepath):
commands = [
# Required for the build script
"apt-get install python3",

# Required for Curl
# This has to be executed before "apt update", otherwise
# it will cause the GitHub runner to restart
"apt-get install libssl-dev",

# Required for Pragma core
"apt install build-essential",
Expand Down Expand Up @@ -303,6 +301,12 @@ def execscript(filepath):
"apt-get install ninja-build"
]

if not no_libssl:
# Required for Curl
# On a Ubuntu 24.04 GitHub runner this will currently cause a build failure, see https://github.com/actions/runner-images/issues/9937
# The --no-libssl option is a workaround until that issue has been resolved.
commands.append("apt-get install libssl-dev")

install_system_packages(commands, no_confirm)

module_list = []
Expand Down
2 changes: 1 addition & 1 deletion github_actions/build_generic_module/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ runs:
id: build-pragma
uses: Silverlan/pragma/github_actions/build@main
with:
build-args: '--with-lua-debugger=0 --with-common-modules=0 --with-essential-client-modules=0 --cmake-arg=${{ steps.set-cmake-args.outputs.cmake-args }} ${{ steps.set-cmake-args.outputs.build-args }}'
build-args: '--with-lua-debugger=0 --no-libssl --with-common-modules=0 --with-essential-client-modules=0 --cmake-arg=${{ steps.set-cmake-args.outputs.cmake-args }} ${{ steps.set-cmake-args.outputs.build-args }}'

- name: Set Output Variables
shell: bash
Expand Down
8 changes: 8 additions & 0 deletions github_actions/install_requirements/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ runs:
- uses: Silverlan/common_actions/action_start@main
with:
name: "pragma > install_requirements"

# This is a temporary fix for https://github.com/actions/runner-images/issues/9937
# We have to install libssl-dev before "apt-get update" is called, otherwise the workflow will fail
- name: Install libssl-dev
shell: bash
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get install libssl-dev
# Required for CUDA
- name: Set up GCC 11
Expand Down

0 comments on commit 8802e21

Please sign in to comment.