-
Notifications
You must be signed in to change notification settings - Fork 0
ci: Update workflows to follow upstream conventions #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+812
−447
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
04bd6ed
refactor(examples): Add test and update dependencies
papazof 608450a
ci: Refactor workflows to follow upstream conventions
papazof e3bccd8
refactor: Remove redundant cgo directives
papazof c4c0422
chore(golangci-lint): Disable `dupSubExpr` check of gocritic
papazof 712f87a
docs: Fix markdown
papazof File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| name: 'Build Meson Project' | ||
| description: 'Configure, build and install meson projects' | ||
|
|
||
| inputs: | ||
| coverage: | ||
| description: 'Whether to enable coverage tracking for the build' | ||
| default: 'false' | ||
| options: | ||
| description: 'Comma-separated list of build options' | ||
| default: '' | ||
| prefix: | ||
| description: 'Installation prefix' | ||
| default: ${{ github.workspace }}/opt | ||
| pkgconfig-prefix: | ||
| description: 'Prefix of the PKG_CONFIG_PATH' | ||
| default: '' | ||
| build-path: | ||
| description: > | ||
| Path to the project's build directory | ||
| default: 'build' | ||
| source-path: | ||
| description: > | ||
| Path to the project's source directory | ||
| default: '.' | ||
| build-type: | ||
| description: 'Type of the build' | ||
| default: 'plain' | ||
| build: | ||
| description: 'Whether to build the project' | ||
| default: '' | ||
| install: | ||
| description: > | ||
| Whether to install the project. If "true", the project will first be | ||
| built. | ||
| default: 'false' | ||
| dist: | ||
| description: 'Whether to generate distribution artifacts for the project' | ||
| default: 'false' | ||
| subprojects: | ||
| description: > | ||
| Whether to include subprojects (when "install" or "dist" are "true") | ||
| default: 'true' | ||
| dist-tests: | ||
| description: 'Whether to run project tests (when "dist" is "true")' | ||
| default: 'false' | ||
| install-deb: | ||
| description: 'Whether to install generated .deb artifacts' | ||
| default: 'false' | ||
|
|
||
| outputs: | ||
| dist-path: | ||
| value: ${{ steps.dist.outputs.dist-path }} | ||
|
|
||
| runs: | ||
| using: 'composite' | ||
| steps: | ||
| - name: Build project | ||
| working-directory: ${{ inputs.source-path }} | ||
| if: >- | ||
| (inputs.build == '' && inputs.dist == 'false') || | ||
| inputs.build == 'true' || | ||
| inputs.install == 'true' | ||
| run: make | ||
| shell: bash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| name: 'Run Tests' | ||
| description: 'Run project tests and generate coverage report' | ||
|
|
||
| inputs: | ||
| build-path: | ||
| description: > | ||
| Path to the project's build directory | ||
| default: 'build' | ||
| source-path: | ||
| description: > | ||
| Path to the project's source directory | ||
| default: '.' | ||
| valgrind: | ||
| description: 'Whether to run the tests with valgrind' | ||
| default: 'false' | ||
| coverage: | ||
| description: 'Whether to generate a coverage report' | ||
| default: 'false' | ||
| gcov: | ||
| description: 'Gcov executable to use' | ||
| required: false | ||
|
|
||
| runs: | ||
| using: 'composite' | ||
| steps: | ||
| - name: Run tests | ||
| id: run-tests | ||
| working-directory: ${{ inputs.source-path }} | ||
| run: go test ./... -v | ||
| shell: bash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,27 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: "gomod" | ||
| directory: "/" | ||
| directories: | ||
| - "**/*" | ||
| schedule: | ||
| interval: "daily" | ||
| interval: "monthly" | ||
| groups: | ||
| gomod: | ||
| patterns: | ||
| - "*" | ||
| commit-message: | ||
| prefix: "build(deps)" | ||
|
|
||
| - package-ecosystem: "github-actions" | ||
| directories: | ||
| - "/" | ||
| # Workaround for https://github.com/dependabot/dependabot-core/issues/6345 | ||
| - "/.github/actions/*" | ||
| schedule: | ||
| interval: "monthly" | ||
| groups: | ||
| github-actions: | ||
| patterns: | ||
| - "*" | ||
| commit-message: | ||
| prefix: "ci(deps)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| header: | ||
| license: | ||
| spdx-id: Apache-2.0-short | ||
| content: | | ||
| SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| pattern: | | ||
| Licensed under the Apache License, Version 2.0 \(the "License"\); | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
|
|
||
| paths-ignore: | ||
| - '**/.*' | ||
| - '**/*.md' | ||
| - '**/*.txt' | ||
| - '**/*.build' | ||
| - '**/*.pc.in' | ||
| - '**/*.toml' | ||
| - '.github' | ||
| - 'LICENSE' | ||
| - 'NOTICE' | ||
| - 'third-party' | ||
| - 'build*' | ||
| - 'bin' | ||
| - 'Makefile' | ||
| - 'go.mod' | ||
| - 'go.sum' | ||
|
|
||
| comment: on-failure |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ["pkgconf"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| name: Build and Verify | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: ["main"] | ||
| types: [synchronize, labeled] | ||
|
|
||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: >- | ||
| ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: read-all | ||
|
|
||
| jobs: | ||
| check-pr-status: | ||
| name: Check PR status | ||
| uses: nubificus/vaccel/.github/workflows/check-pr-status.yml@main | ||
| secrets: inherit | ||
|
|
||
| test-build: | ||
| needs: check-pr-status | ||
| name: Test Build | ||
| if: needs.check-pr-status.outputs.expects-checks == 'true' | ||
| uses: nubificus/vaccel/.github/workflows/test-build.yml@main | ||
| with: | ||
| options: '' | ||
| valgrind: false | ||
| secrets: inherit | ||
|
|
||
| # verify-build: | ||
| # needs: check-pr-status | ||
| # name: Verify Build | ||
| # if: needs.check-pr-status.outputs.expects-checks == 'true' | ||
| # uses: nubificus/vaccel/.github/workflows/verify-build.yml@main | ||
| # with: | ||
| # options: '' | ||
| # valgrind: false | ||
| # skip-examples: true | ||
| # secrets: inherit | ||
|
|
||
| validate-files-and-commits: | ||
|
github-advanced-security[bot] marked this conversation as resolved.
Fixed
|
||
| needs: check-pr-status | ||
| name: Validate Files and Commits | ||
| if: needs.check-pr-status.outputs.expects-checks == 'true' | ||
| uses: nubificus/vaccel/.github/workflows/validate-files-and-commits.yml@main | ||
| secrets: inherit | ||
|
|
||
| validate-code: | ||
|
github-advanced-security[bot] marked this conversation as resolved.
Fixed
|
||
| needs: check-pr-status | ||
| name: Validate Code | ||
| if: needs.check-pr-status.outputs.expects-checks == 'true' | ||
| uses: ./.github/workflows/validate-code.yml | ||
| secrets: inherit | ||
|
|
||
| # generate-coverage: | ||
| # needs: | ||
| # - check-pr-status | ||
| # - test-build | ||
| # - verify-build | ||
| # - validate-files-and-commits | ||
| # - validate-code | ||
| # name: Generate Coverage Report | ||
| # uses: ./.github/workflows/coverage-report.yml | ||
| # with: | ||
| # comment-diff: true | ||
|
|
||
| # Dummy job for setting required checks | ||
| jobs-completed: | ||
| needs: | ||
| - check-pr-status | ||
| - test-build | ||
| - validate-files-and-commits | ||
| - validate-code | ||
| name: Jobs Completed | ||
| if: >- | ||
| always() && | ||
| (needs.check-pr-status.outputs.is-approved == 'true' || | ||
| (needs.check-pr-status.outputs.expects-checks == 'true' && | ||
| !contains(needs.*.result, 'failure') && | ||
| !contains(needs.*.result, 'cancelled'))) | ||
| runs-on: base-2204-amd64 | ||
| steps: | ||
| - run: exit 0 | ||
|
github-advanced-security[bot] marked this conversation as resolved.
Fixed
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.