Skip to content

Commit

Permalink
Fix builder setups
Browse files Browse the repository at this point in the history
  • Loading branch information
0Tech committed Feb 12, 2024
1 parent ea8ef4e commit 1d38e3d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,38 @@ on:
env:
id: x-${{ inputs.name }}
path: x/${{ inputs.name }}
timeout_minutes: 30
jobs:
go-lint:
name: go lint
runs-on: ubuntu-latest
timeout-minutes: ${{ env.timeout_minutes }}
steps:
- uses: actions/checkout@v4
- name: Configure
run: cmake -S . -B build -D FIX_IS_ERROR=ON
run: cmake -S . -B build -D USE_DOCKER=ON -D FIX_IS_ERROR=ON
- name: Lint
run: cmake --build build --target go_lint_${{ env.id }}
go-build:
name: go build
runs-on: ubuntu-latest
timeout-minutes: ${{ env.timeout_minutes }}
steps:
- uses: actions/checkout@v4
- name: Configure
run: cmake -S . -B build -D FIX_IS_ERROR=ON
run: cmake -S . -B build -D USE_DOCKER=ON -D FIX_IS_ERROR=ON
- name: Build
run: cmake --build build --target go_build_${{ env.id }}
go-test:
name: go test
runs-on: ubuntu-latest
timeout-minutes: ${{ env.timeout_minutes }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Configure
run: cmake -S . -B build -D FIX_IS_ERROR=ON
- name: Install builders
run: cmake --build build --target install_go
run: cmake -S . -B build -D USE_DOCKER=ON -D FIX_IS_ERROR=ON
- name: Test
run: |
VERBOSE=1 ctest --test-dir build --output-on-failure --stop-on-failure -R ${{ env.id }}
Expand All @@ -55,18 +57,20 @@ jobs:
buf-format:
name: buf format
runs-on: ubuntu-latest
timeout-minutes: ${{ env.timeout_minutes }}
steps:
- uses: actions/checkout@v4
- name: Configure
run: cmake -S . -B build -D FIX_IS_ERROR=ON
run: cmake -S . -B build -D USE_DOCKER=ON -D FIX_IS_ERROR=ON
- name: Lint
run: cmake --build build --target buf_format_${{ env.id }}
buf-lint:
name: buf lint
runs-on: ubuntu-latest
timeout-minutes: ${{ env.timeout_minutes }}
steps:
- uses: actions/checkout@v4
- name: Configure
run: cmake -S . -B build -D FIX_IS_ERROR=ON
run: cmake -S . -B build -D USE_DOCKER=ON -D FIX_IS_ERROR=ON
- name: Lint
run: cmake --build build --target buf_lint_${{ env.id }}
6 changes: 6 additions & 0 deletions runners/bare/install/version.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
function(get_version _version _binary _module)
set(${_version} 0)

find_file(_binary_path ${_binary})
if(_binary_path STREQUAL _binary_path-NOTFOUND)
return(PROPAGATE ${_version})
endif()

execute_process(
COMMAND go version -m ${_binary_path}
OUTPUT_VARIABLE _output
Expand Down

0 comments on commit 1d38e3d

Please sign in to comment.