setup-vulkan-sdk icon indicating copy to clipboard operation
setup-vulkan-sdk copied to clipboard

Action fails with "parse error: Invalid numeric literal"

Open Silverlan opened this issue 2 years ago • 4 comments

This action has been working fine for me until yesterday, but now I can't get it to succeed anymore. It fails with the following error: 2022-10-26T07:23:34.7120775Z parse error: Invalid numeric literal at line 1, column 7

Here is the entire log:

2022-10-26T07:23:27.1469329Z Requested labels: ubuntu-latest
2022-10-26T07:23:27.1469369Z Job defined at: Silverlan/test_github_action_vulkan/.github/workflows/pragma-linux-ci.yml@refs/heads/main
2022-10-26T07:23:27.1469394Z Waiting for a runner to pick up this job...
2022-10-26T07:23:27.2779776Z Job is waiting for a hosted runner to come online.
2022-10-26T07:23:30.8678961Z Job is about to start running on the hosted runner: Hosted Agent (hosted)
2022-10-26T07:23:32.8176623Z Current runner version: '2.298.2'
2022-10-26T07:23:32.8202076Z ##[group]Operating System
2022-10-26T07:23:32.8202632Z Ubuntu
2022-10-26T07:23:32.8202880Z 20.04.5
2022-10-26T07:23:32.8203258Z LTS
2022-10-26T07:23:32.8203559Z ##[endgroup]
2022-10-26T07:23:32.8203836Z ##[group]Runner Image
2022-10-26T07:23:32.8204212Z Image: ubuntu-20.04
2022-10-26T07:23:32.8204575Z Version: 20221018.2
2022-10-26T07:23:32.8205092Z Included Software: https://github.com/actions/runner-images/blob/ubuntu20/20221018.2/images/linux/Ubuntu2004-Readme.md
2022-10-26T07:23:32.8205691Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu20%2F20221018.2
2022-10-26T07:23:32.8206142Z ##[endgroup]
2022-10-26T07:23:32.8206486Z ##[group]Runner Image Provisioner
2022-10-26T07:23:32.8206812Z 2.0.91.1
2022-10-26T07:23:32.8207109Z ##[endgroup]
2022-10-26T07:23:32.8208056Z ##[group]GITHUB_TOKEN Permissions
2022-10-26T07:23:32.8208714Z Actions: write
2022-10-26T07:23:32.8209025Z Checks: write
2022-10-26T07:23:32.8209552Z Contents: write
2022-10-26T07:23:32.8209900Z Deployments: write
2022-10-26T07:23:32.8210219Z Discussions: write
2022-10-26T07:23:32.8210575Z Issues: write
2022-10-26T07:23:32.8210896Z Metadata: read
2022-10-26T07:23:32.8211166Z Packages: write
2022-10-26T07:23:32.8211483Z Pages: write
2022-10-26T07:23:32.8211843Z PullRequests: write
2022-10-26T07:23:32.8212159Z RepositoryProjects: write
2022-10-26T07:23:32.8212535Z SecurityEvents: write
2022-10-26T07:23:32.8212867Z Statuses: write
2022-10-26T07:23:32.8213138Z ##[endgroup]
2022-10-26T07:23:32.8216779Z Secret source: Actions
2022-10-26T07:23:32.8217312Z Prepare workflow directory
2022-10-26T07:23:32.9044582Z Prepare all required actions
2022-10-26T07:23:32.9227282Z Getting action download info
2022-10-26T07:23:33.0966280Z Download action repository 'humbletim/[email protected]' (SHA:72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14)
2022-10-26T07:23:33.5657948Z Getting action download info
2022-10-26T07:23:33.8163778Z Download action repository 'humbletim/vsdevenv-shell@e87fcf2359929606ba32db358baef5ede4737aed' (SHA:e87fcf2359929606ba32db358baef5ede4737aed)
2022-10-26T07:23:34.0446020Z Download action repository 'actions/cache@v2' (SHA:937d24475381cd9c75ae6db12cb4e79714b926ed)
2022-10-26T07:23:34.4023858Z ##[group]Run humbletim/[email protected]
2022-10-26T07:23:34.4024196Z with:
2022-10-26T07:23:34.4024422Z   vulkan-query-version: 1.3.211.0
2022-10-26T07:23:34.4024745Z   vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang
2022-10-26T07:23:34.4025043Z   vulkan-use-cache: true
2022-10-26T07:23:34.4025257Z ##[endgroup]
2022-10-26T07:23:34.4253117Z ##[group]Run humbletim/vsdevenv-shell@e87fcf2359929606ba32db358baef5ede4737aed
2022-10-26T07:23:34.4253453Z ##[endgroup]
2022-10-26T07:23:34.4303009Z ##[group]Run if [[ $RUNNER_OS == 'Windows' ]] ; then
2022-10-26T07:23:34.4303424Z [36;1mif [[ $RUNNER_OS == 'Windows' ]] ; then[0m
2022-10-26T07:23:34.4303718Z [36;1m  echo $GITHUB_ACTION_PATH/bin | tee -a $GITHUB_PATH[0m
2022-10-26T07:23:34.4303996Z [36;1melse[0m
2022-10-26T07:23:34.4304366Z [36;1m  echo "NOTE: emulating vsdevenv-shell integration (since RUNNER_OS is $RUNNER_OS, not Windows)"[0m
2022-10-26T07:23:34.4304790Z [36;1m  echo $GITHUB_ACTION_PATH/bin | tee -a $GITHUB_PATH[0m
2022-10-26T07:23:34.4305097Z [36;1m  cat<<-'EOF' > $GITHUB_ACTION_PATH/bin/vsdevenv[0m
2022-10-26T07:23:34.4305356Z [36;1m#!/bin/bash[0m
2022-10-26T07:23:34.4305566Z [36;1mset -e[0m
2022-10-26T07:23:34.4305759Z [36;1mshift # x86[0m
2022-10-26T07:23:34.4305974Z [36;1msubshell=$1[0m
2022-10-26T07:23:34.4306198Z [36;1mshift # subshell[0m
2022-10-26T07:23:34.4306416Z [36;1mcase $subshell in[0m
2022-10-26T07:23:34.4306700Z [36;1m  bash) bash --noprofile --norc -e -o pipefail "$1" ;;[0m
2022-10-26T07:23:34.4307243Z [36;1m  pwsh|powershell) pwsh -command "\$ErrorActionPreference = 'stop' ; get-content '$1' | Invoke-Expression ; if ((Test-Path -LiteralPath variable:\\LASTEXITCODE)) { exit \$LASTEXITCODE }" ;;[0m
2022-10-26T07:23:34.4307768Z [36;1m  *) echo "skipping subshell=$subshell on $RUNNER_OS" ; exit 0 ;;[0m
2022-10-26T07:23:34.4308267Z [36;1mesac[0m
2022-10-26T07:23:34.4308467Z [36;1mEOF[0m
2022-10-26T07:23:34.4308725Z [36;1m  chmod a+x $GITHUB_ACTION_PATH/bin/vsdevenv[0m
2022-10-26T07:23:34.4309023Z [36;1m  cat $GITHUB_ACTION_PATH/bin/vsdevenv[0m
2022-10-26T07:23:34.4309305Z [36;1mfi[0m
2022-10-26T07:23:34.4368488Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
2022-10-26T07:23:34.4368804Z ##[endgroup]
2022-10-26T07:23:34.4632588Z NOTE: emulating vsdevenv-shell integration (since RUNNER_OS is Linux, not Windows)
2022-10-26T07:23:34.4633933Z /home/runner/work/_actions/humbletim/vsdevenv-shell/e87fcf2359929606ba32db358baef5ede4737aed/bin
2022-10-26T07:23:34.4663817Z #!/bin/bash
2022-10-26T07:23:34.4666151Z set -e
2022-10-26T07:23:34.4675042Z shift # x86
2022-10-26T07:23:34.4676653Z subshell=$1
2022-10-26T07:23:34.4676924Z shift # subshell
2022-10-26T07:23:34.4677127Z case $subshell in
2022-10-26T07:23:34.4677569Z   bash) bash --noprofile --norc -e -o pipefail "$1" ;;
2022-10-26T07:23:34.4678337Z   pwsh|powershell) pwsh -command "\$ErrorActionPreference = 'stop' ; get-content '$1' | Invoke-Expression ; if ((Test-Path -LiteralPath variable:\\LASTEXITCODE)) { exit \$LASTEXITCODE }" ;;
2022-10-26T07:23:34.4678854Z   *) echo "skipping subshell=$subshell on $RUNNER_OS" ; exit 0 ;;
2022-10-26T07:23:34.4679118Z esac
2022-10-26T07:23:34.4916168Z ##[group]Run # resolve_vulkan_sdk_environment
2022-10-26T07:23:34.4916509Z [36;1m# resolve_vulkan_sdk_environment[0m
2022-10-26T07:23:34.4916799Z [36;1m. $GITHUB_ACTION_PATH/action_helpers.sh[0m
2022-10-26T07:23:34.4917072Z [36;1mresolve_vulkan_sdk_environment \[0m
2022-10-26T07:23:34.4917315Z [36;1m  "1.3.211.0" \[0m
2022-10-26T07:23:34.4917514Z [36;1m  "" \[0m
2022-10-26T07:23:34.4917761Z [36;1m  "Vulkan-Headers, Vulkan-Loader, Glslang"[0m
2022-10-26T07:23:34.4972700Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
2022-10-26T07:23:34.4972981Z ##[endgroup]
2022-10-26T07:23:34.5117252Z mkdir: created directory '/home/runner/work/test_github_action_vulkan/test_github_action_vulkan/_vulkan_build'
2022-10-26T07:23:34.5130760Z mkdir: created directory '/home/runner/work/test_github_action_vulkan/test_github_action_vulkan/VULKAN_SDK'
2022-10-26T07:23:34.7120775Z parse error: Invalid numeric literal at line 1, column 7
2022-10-26T07:23:34.7144907Z ##[error]Process completed with exit code 4.
2022-10-26T07:23:34.7273563Z Post job cleanup.
2022-10-26T07:23:34.7391164Z Cleaning up orphan processes

My test workflow is very basic and just looks like this:

name: Build Linux
on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

concurrency:
  group: environment-lin-${{ github.ref }}
  cancel-in-progress: true

jobs:
  build:
    name: Build - ${{ matrix.config.os }}
    runs-on: ${{ matrix.config.os }}
    strategy:
      fail-fast: false
      matrix:
        config:
          - os: ubuntu-latest
            name: "Ubuntu GCC-11"
            artifact: "ubuntu_gcc.7z"
            archiver: "7z a"
            generators: "Unix Makefiles"
            build_dir: 'build'
    steps:
      - name: Prepare Vulkan SDK
        uses: humbletim/[email protected]
        with:
          vulkan-query-version: 1.3.211.0
          vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang
          vulkan-use-cache: true

https://github.com/Silverlan/test_github_action_vulkan/blob/main/.github/workflows/pragma-linux-ci.yml

Silverlan avatar Oct 26 '22 07:10 Silverlan

thanks for the issue report. i was able to replicate the issue locally and suspect a small bug in parsing of the branch/tag/commit information from the config JSON.

not sure why it would only break now -- except, a new official Vulkan SDK did come out this week, so it's possible the web services / configuration files were updated. continue to investigate

humbletim avatar Oct 26 '22 14:10 humbletim

I dont know why or how but it is working again in my repo without changing anything related to GitHub Actions.

GamesTrap avatar Oct 27 '22 10:10 GamesTrap

I dont know why or how but it is working again in my repo without changing anything related to GitHub Actions.

Can confirm, it's working for me again as well. I'll leave the issue open for now since the cause is still unknown.

Silverlan avatar Oct 27 '22 17:10 Silverlan

Thanks for the follow-ups (it is also started working for me suddenly).

Root cause apparently interim changes on LunarG's side, but checking their bug tracker, I don't see any recent issues filed/closed about it (https://vulkan.lunarg.com/issue/home).

In any event, the ambiguous error message bothers me and I am planning to add a few more webservice/config preflight checks into the upcoming v1.2.1 release. cc: #12

humbletim avatar Oct 27 '22 19:10 humbletim

having been unable to repro again, closing this given #12 merges better error reporting that theoretically will help catch these kinds of nuances moving forward. thanks!

humbletim avatar Feb 10 '24 21:02 humbletim