Skip to content

Instantly share code, notes, and snippets.

@kwsp
Created July 11, 2024 08:12
Show Gist options
  • Save kwsp/750d085a0360bc20a6a953fd3398a144 to your computer and use it in GitHub Desktop.
Save kwsp/750d085a0360bc20a6a953fd3398a144 to your computer and use it in GitHub Desktop.
Trick to debug VCPKG build errors in GitHub Actions
jobs:
  build:
    steps:
      - name: Export GitHub Actions cache environment variables
        uses: actions/github-script@v7
        with:
          script: |
            core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
            core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
      
      - name: The step that fails and generates a debug log file at <LOG_PATH>
        # Make sure the next step runs
        continue-on-error: true
        
      - name: Upload vcpkg build log
        uses: actions/upload-artifact@v4
        with:
          name: debug.log
          path: <LOG_PATH>
          overwrite: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment