Closed Notten02 closed 1 month ago
@Notten02 Can you post the relevant GitHub Actions workflow file?
@Notten02 this is an example of a run on windows https://github.com/GitTools/actions-test/actions/runs/10038833569/job/27741576219 and this is an example of workflow file https://github.com/GitTools/actions-test/blob/main/.github/workflows/ci.yml
I cannot post the file in its entirety, the action is wrapped into an internal action, but I can post some relevant parts
workflow:
name: Build
on:
push:
branches-ignore:
- "master"
- "main"
concurrency:
group: '${{ github.workflow }} @ ${{ github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
Build:
timeout-minutes: 10
runs-on: [self-hosted, tcbuild]
outputs:
fullSemVer: ${{ steps.buildstep.outputs.fullSemVer }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: internal/repository/build-twincat-library@v2
id: buildstep
with:
solution: Voortman.TcLib.Base.sln
project: Voortman.TcLib.Base
compiledLibrary: false
#other steps that are irrelevant
build-twincat-library:
#some setup with inputs and name here
runs:
using: composite
steps:
#some irrelevant steps for compilation here
- name: Install gitversion
uses: gittools/actions/gitversion/setup@v2.0.1
with:
versionSpec: '5.x'
#more irrelevant steps
- name: Run gitversion
id: gitversion
uses: gittools/actions/gitversion/execute@v2.0.1
with:
useConfigFile: true
#more steps that depend on the semver from gitversion
While not one to one it seems pretty much the same as in the example?
to me it seems the GITVERSION_PATH
variable it's not correctly set in the setup
action, and it's used for the execute
action
unfortunately there is no easy way for me to repro this. Can you fork https://github.com/GitTools/actions-test instead and try to run on those self-hosted agents?
Sorry I had a day off yesterday, I will fork and run the code later today and send you the logs
I ran the CI build on our internal server, The V5 of gitversion seems to fail. The log archive is attached.
I did a copy paste of the repo instead of a fork. I did not want to expose the internal buildnodes to a public repository. The found version numbers might be a little different then what you'd expect
I would say use the version that does work if you don't have time to investigate further. Just one question, in the V5 version can you check the location where the tool is installed if the exe file is actually there
The tool is there and installed, only the path is different. For V5 it adds a x64 folder for the installation. D:\Workspaces\_tool\GitVersion.Tool\5.12.0\x64\dotnet-gitversion.exe
would be the correct path on our build agent
what about the version 6.0.0? which path its on?
D:\Workspaces\_tool\GitVersion.Tool\6.0.0\dotnet-gitversion.exe
In that case just use v6
Prerequisites
GitVersion package
GitHub Actions
What are you seeing?
We are running self hosted windows runners. We are using V2.0.1 of this action but also see the behavior in V2.0.0. The action will successfully download the gitversion dotnet tool. But try's calling it on a incorrect path.
In the log:
Some other unrelated build steps take place here
I've looked at the build node. In the log it appears to be calling gitversion at
D:\workspaces\_tool\GitVersion.Tool\5.12.0\dotnet-gitversion.exe
. On file system the tool is located atD:\workspaces\_tool\GitVersion.Tool\5.12.0\x64\dotnet-gitversion.exe
What is expected?
For the action to generate a version number and not give a command failed error
Steps to Reproduce
Call the action on a self hosted runner with Windows server 2019 as OS (perhaps also other operating systems but I don't have those running out here)
Output log or link to your CI build (if appropriate).