@dougefresh/ci 0.1.15 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/defaults.d.ts +13 -0
- package/dist/defaults.d.ts.map +1 -0
- package/dist/defaults.js +95 -0
- package/dist/defaults.js.map +1 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +119 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +79 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +9 -0
- package/dist/types.js.map +1 -0
- package/package.json +6 -1
- package/.checkov.yml +0 -7
- package/.env.example +0 -61
- package/.gitattributes +0 -3
- package/.github/actions/install-yq/action.yaml +0 -80
- package/.github/actions/install-yq/scripts/unixish.sh +0 -112
- package/.github/actions/install-yq/scripts/windowsish.ps1 +0 -99
- package/.github/actions/jobtaker/action.yml +0 -29
- package/.github/actions/rust-config/action.yml +0 -34
- package/.github/actions/rust-init/action.yml +0 -75
- package/.github/additional-prompt.md +0 -62
- package/.github/ci-configs/dummy.yml +0 -24
- package/.github/ci-configs/rust/ai.yml +0 -65
- package/.github/ci-configs/rust-default.yml +0 -115
- package/.github/ci-configs/test/01.yml +0 -9
- package/.github/dependabot.yml +0 -26
- package/.github/prompts/create-release-notes.prompt.md +0 -29
- package/.github/prompts/unit-test.prompt.md +0 -77
- package/.github/rust-ci.ts +0 -5
- package/.github/workflows/action-ci.yml +0 -39
- package/.github/workflows/action-review.yml +0 -57
- package/.github/workflows/dummy-release.yml +0 -32
- package/.github/workflows/dummy-test.yml +0 -16
- package/.github/workflows/pages.yml +0 -59
- package/.github/workflows/pr-review.yml +0 -59
- package/.github/workflows/release.yml +0 -36
- package/.github/workflows/rust-release.yml +0 -133
- package/.github/workflows/rust.yml +0 -247
- package/.node-version +0 -1
- package/AGENTS.md +0 -28
- package/Cargo.toml +0 -6
- package/action.yml +0 -50
- package/biome.json +0 -108
- package/bun.lock +0 -39
- package/docs/SUMMARY.md +0 -3
- package/docs/book.toml +0 -49
- package/docs/index.md +0 -32
- package/pre-commit +0 -2
- package/prompt-template.md +0 -180
- package/scripts/bump-version.ts +0 -16
- package/scripts/generate-rust.ts +0 -9
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
name: test
|
|
2
|
-
on:
|
|
3
|
-
pull_request:
|
|
4
|
-
branches:
|
|
5
|
-
- main
|
|
6
|
-
push:
|
|
7
|
-
branches:
|
|
8
|
-
- main
|
|
9
|
-
permissions:
|
|
10
|
-
contents: read
|
|
11
|
-
jobs:
|
|
12
|
-
test-action:
|
|
13
|
-
name: Actions Test / ${{ matrix.os }}
|
|
14
|
-
runs-on: ${{ matrix.os }}
|
|
15
|
-
strategy:
|
|
16
|
-
fail-fast: false
|
|
17
|
-
matrix:
|
|
18
|
-
os:
|
|
19
|
-
- ${{ vars.RUNNER_ARM64 }}
|
|
20
|
-
steps:
|
|
21
|
-
- name: Checkout
|
|
22
|
-
id: checkout
|
|
23
|
-
uses: actions/checkout@v6
|
|
24
|
-
- name: Test Local Action
|
|
25
|
-
id: test-action
|
|
26
|
-
uses: ./
|
|
27
|
-
- name: Print Output
|
|
28
|
-
id: output
|
|
29
|
-
shell: bash
|
|
30
|
-
run: |
|
|
31
|
-
echo '${{ steps.test-action.outputs.config }}' | jq .
|
|
32
|
-
packages="${{ fromJSON(steps.test-action.outputs.config).global.packages.Linux }}"
|
|
33
|
-
echo $packages
|
|
34
|
-
# pages="${{ fromJSON(steps.test-action.outputs.config).pages.mdbook.if }}"
|
|
35
|
-
|
|
36
|
-
# if [ "$pages" != "false" ]; then
|
|
37
|
-
# echo "pages should be false"
|
|
38
|
-
# exit 1
|
|
39
|
-
# fi
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
name: jobtaker
|
|
2
|
-
on:
|
|
3
|
-
pull_request:
|
|
4
|
-
types: [opened, synchronize, ready_for_review, reopened]
|
|
5
|
-
permissions:
|
|
6
|
-
contents: read
|
|
7
|
-
checks: write
|
|
8
|
-
pull-requests: write
|
|
9
|
-
id-token: write
|
|
10
|
-
jobs:
|
|
11
|
-
config:
|
|
12
|
-
if: |
|
|
13
|
-
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@jobtaker')) ||
|
|
14
|
-
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@jobtaker')) ||
|
|
15
|
-
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@jobtaker')) ||
|
|
16
|
-
(contains(github.event.pull_request.labels.*.name, 'jobtaker')) ||
|
|
17
|
-
(github.event_name == 'issues' && (contains(github.event.issue.body, '@jobtaker') || contains(github.event.issue.title, '@jobtaker')))
|
|
18
|
-
runs-on: ${{ vars.RUNNER }}
|
|
19
|
-
name: generate config
|
|
20
|
-
outputs:
|
|
21
|
-
config: ${{ steps.config.outputs.config }}
|
|
22
|
-
steps:
|
|
23
|
-
- name: Validate ANTHROPIC_API_KEY
|
|
24
|
-
shell: bash
|
|
25
|
-
run: |
|
|
26
|
-
if [ -z "${{ secrets.ANTHROPIC_API_KEY }}" ]; then
|
|
27
|
-
exit 1
|
|
28
|
-
fi
|
|
29
|
-
- uses: actions/checkout@v6
|
|
30
|
-
- name: config
|
|
31
|
-
id: config
|
|
32
|
-
uses: ./.github/actions/rust-config
|
|
33
|
-
with:
|
|
34
|
-
arm64: ${{ vars.RUNNER_ARM64 }}
|
|
35
|
-
amd64: ${{ vars.RUNNER_AMD64 }}
|
|
36
|
-
git_token: ${{ github.token }}
|
|
37
|
-
|
|
38
|
-
jobtaker:
|
|
39
|
-
needs: [config]
|
|
40
|
-
if: |
|
|
41
|
-
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@jobtaker')) ||
|
|
42
|
-
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@jobtaker')) ||
|
|
43
|
-
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@jobtaker')) ||
|
|
44
|
-
(contains(github.event.pull_request.labels.*.name, 'jobtaker')) ||
|
|
45
|
-
(github.event_name == 'issues' && (contains(github.event.issue.body, '@jobtaker') || contains(github.event.issue.title, '@jobtaker')))
|
|
46
|
-
runs-on: ${{ vars.RUNNER }}
|
|
47
|
-
steps:
|
|
48
|
-
- uses: actions/checkout@v6
|
|
49
|
-
- name: checkout
|
|
50
|
-
uses: ./.github/actions/rust-init
|
|
51
|
-
with:
|
|
52
|
-
packages: ${{ toJSON(fromJSON(needs.config.outputs.config).global.packages) }}
|
|
53
|
-
- name: jobtaker
|
|
54
|
-
uses: ./.github/actions/jobtaker
|
|
55
|
-
with:
|
|
56
|
-
config: ${{ needs.config.outputs.config }}
|
|
57
|
-
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
name: release
|
|
2
|
-
permissions:
|
|
3
|
-
contents: write
|
|
4
|
-
checks: write
|
|
5
|
-
on:
|
|
6
|
-
workflow_dispatch:
|
|
7
|
-
inputs:
|
|
8
|
-
version:
|
|
9
|
-
description: 'version to release'
|
|
10
|
-
required: true
|
|
11
|
-
type: choice
|
|
12
|
-
default: patch
|
|
13
|
-
options:
|
|
14
|
-
- patch
|
|
15
|
-
- rc
|
|
16
|
-
- minor
|
|
17
|
-
- beta
|
|
18
|
-
- alpha
|
|
19
|
-
- major
|
|
20
|
-
- release
|
|
21
|
-
runner:
|
|
22
|
-
description: 'Runner to use'
|
|
23
|
-
required: false
|
|
24
|
-
jobs:
|
|
25
|
-
releaser:
|
|
26
|
-
if: false
|
|
27
|
-
name: release
|
|
28
|
-
uses: ./.github/workflows/rust-release.yml
|
|
29
|
-
secrets: inherit
|
|
30
|
-
with:
|
|
31
|
-
version: ${{ inputs.version }}
|
|
32
|
-
package: 'dummy'
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
name: dummy
|
|
2
|
-
permissions:
|
|
3
|
-
contents: read
|
|
4
|
-
checks: write
|
|
5
|
-
on:
|
|
6
|
-
push:
|
|
7
|
-
branches: [main]
|
|
8
|
-
pull_request:
|
|
9
|
-
jobs:
|
|
10
|
-
verify:
|
|
11
|
-
if: true
|
|
12
|
-
name: dummy
|
|
13
|
-
uses: ./.github/workflows/rust.yml
|
|
14
|
-
secrets: inherit
|
|
15
|
-
with:
|
|
16
|
-
runner: ${{ vars.RUNNER }}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
name: Pages
|
|
2
|
-
permissions:
|
|
3
|
-
contents: write # To push a branch
|
|
4
|
-
pages: write # To push to a GitHub Pages site
|
|
5
|
-
id-token: write # To update the deployment status
|
|
6
|
-
on:
|
|
7
|
-
workflow_call:
|
|
8
|
-
inputs:
|
|
9
|
-
runner:
|
|
10
|
-
type: string
|
|
11
|
-
default: ${{ vars.RUNNER }}
|
|
12
|
-
required: false
|
|
13
|
-
|
|
14
|
-
jobs:
|
|
15
|
-
config:
|
|
16
|
-
runs-on: ubicloud-standard-2
|
|
17
|
-
name: generate config
|
|
18
|
-
outputs:
|
|
19
|
-
config: ${{ steps.merge.outputs.config }}
|
|
20
|
-
steps:
|
|
21
|
-
- name: merge
|
|
22
|
-
id: merge
|
|
23
|
-
uses: dougefresh/ci/.github/actions/rust-config@main
|
|
24
|
-
with:
|
|
25
|
-
git_token: ${{ github.token }}
|
|
26
|
-
runner: ${{ inputs.runner }}
|
|
27
|
-
mdbook:
|
|
28
|
-
runs-on: ubicloud-standard-2
|
|
29
|
-
needs: ['config']
|
|
30
|
-
if: ${{ fromJSON(needs.config.outputs.config).pages.mdbook.if }}
|
|
31
|
-
steps:
|
|
32
|
-
- uses: actions/checkout@v6
|
|
33
|
-
with:
|
|
34
|
-
fetch-depth: 0
|
|
35
|
-
# - name: Install latest mdbook
|
|
36
|
-
# run: |
|
|
37
|
-
# tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name')
|
|
38
|
-
# url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-aarch64-unknown-linux-gnu.tar.gz"
|
|
39
|
-
# mkdir mdbook
|
|
40
|
-
# curl -sSL $url | tar -xz --directory=./mdbook
|
|
41
|
-
# echo `pwd`/mdbook >> $GITHUB_PATH
|
|
42
|
-
- uses: jontze/action-mdbook@v4
|
|
43
|
-
name: Install mdBook
|
|
44
|
-
with:
|
|
45
|
-
token: ${{secrets.GITHUB_TOKEN}}
|
|
46
|
-
- name: Build Book
|
|
47
|
-
run: |
|
|
48
|
-
cd ${{ fromJSON(needs.config.outputs.config).pages.mdbook.path }}
|
|
49
|
-
${{ fromJSON(needs.config.outputs.config).pages.mdbook.command }}
|
|
50
|
-
|
|
51
|
-
- name: Setup Pages
|
|
52
|
-
uses: actions/configure-pages@v5
|
|
53
|
-
- name: Upload artifact
|
|
54
|
-
uses: actions/upload-pages-artifact@v4
|
|
55
|
-
with:
|
|
56
|
-
path: ${{ fromJSON(needs.config.outputs.config).pages.mdbook.path }}/book
|
|
57
|
-
- name: Deploy to GitHub Pages
|
|
58
|
-
id: deployment
|
|
59
|
-
uses: actions/deploy-pages@v4
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
name: jobtaker
|
|
2
|
-
on:
|
|
3
|
-
workflow_call:
|
|
4
|
-
inputs:
|
|
5
|
-
action_ref:
|
|
6
|
-
description: 'Ref to use for dougefresh/ci actions'
|
|
7
|
-
type: string
|
|
8
|
-
default: 'main'
|
|
9
|
-
permissions:
|
|
10
|
-
contents: read
|
|
11
|
-
checks: write
|
|
12
|
-
pull-requests: write
|
|
13
|
-
id-token: write
|
|
14
|
-
jobs:
|
|
15
|
-
|
|
16
|
-
config:
|
|
17
|
-
if: |
|
|
18
|
-
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@jobtaker')) ||
|
|
19
|
-
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@jobtaker')) ||
|
|
20
|
-
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@jobtaker')) ||
|
|
21
|
-
(contains(github.event.pull_request.labels.*.name, 'jobtaker')) ||
|
|
22
|
-
(github.event_name == 'issues' && (contains(github.event.issue.body, '@jobtaker') || contains(github.event.issue.title, '@jobtaker')))
|
|
23
|
-
runs-on: ${{ inputs.runner || vars.RUNNER }}
|
|
24
|
-
name: generate config
|
|
25
|
-
outputs:
|
|
26
|
-
config: ${{ steps.config.outputs.config }}
|
|
27
|
-
steps:
|
|
28
|
-
- name: Validate ANTHROPIC_API_KEY
|
|
29
|
-
shell: bash
|
|
30
|
-
run: |
|
|
31
|
-
if [ -z "${{ secrets.ANTHROPIC_API_KEY }}" ]; then
|
|
32
|
-
exit 1
|
|
33
|
-
fi
|
|
34
|
-
- name: config
|
|
35
|
-
id: config
|
|
36
|
-
uses: dougefresh/ci/.github/actions/rust-config@main
|
|
37
|
-
with:
|
|
38
|
-
arm64: ${{ vars.RUNNER_ARM64 }}
|
|
39
|
-
amd64: ${{ vars.RUNNER_AMD64 }}
|
|
40
|
-
git_token: ${{ github.token }}
|
|
41
|
-
jobtaker:
|
|
42
|
-
needs: [config]
|
|
43
|
-
if: |
|
|
44
|
-
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@jobtaker')) ||
|
|
45
|
-
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@jobtaker')) ||
|
|
46
|
-
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@jobtaker')) ||
|
|
47
|
-
(contains(github.event.pull_request.labels.*.name, 'jobtaker')) ||
|
|
48
|
-
(github.event_name == 'issues' && (contains(github.event.issue.body, '@jobtaker') || contains(github.event.issue.title, '@jobtaker')))
|
|
49
|
-
runs-on: ${{ vars.RUNNER }}
|
|
50
|
-
steps:
|
|
51
|
-
- name: checkout
|
|
52
|
-
uses: dougefresh/ci/.github/actions/rust-init@main
|
|
53
|
-
with:
|
|
54
|
-
packages: ${{ toJSON(fromJSON(needs.config.outputs.config).global.packages) }}
|
|
55
|
-
- name: jobtaker
|
|
56
|
-
uses: dougefresh/ci/.github/actions/jobtaker@main
|
|
57
|
-
with:
|
|
58
|
-
config: ${{ needs.config.outputs.config }}
|
|
59
|
-
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
name: ci lib release
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
|
|
6
|
-
permissions:
|
|
7
|
-
contents: write
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
release:
|
|
11
|
-
runs-on: ${{ vars.RUNNER }}
|
|
12
|
-
permissions:
|
|
13
|
-
contents: write
|
|
14
|
-
packages: write
|
|
15
|
-
steps:
|
|
16
|
-
- uses: actions/checkout@v6
|
|
17
|
-
|
|
18
|
-
- uses: oven-sh/setup-bun@v2
|
|
19
|
-
|
|
20
|
-
- name: Configure npm registry
|
|
21
|
-
run: |
|
|
22
|
-
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
|
|
23
|
-
- name: Build
|
|
24
|
-
run: bun install && bun run build
|
|
25
|
-
- name: Get version
|
|
26
|
-
id: version
|
|
27
|
-
run: echo "tag=$(jq -r .version package.json)" >> $GITHUB_OUTPUT
|
|
28
|
-
# - name: Publish
|
|
29
|
-
# run: bun publish --access public
|
|
30
|
-
- name: Publish to npm
|
|
31
|
-
run: npm publish
|
|
32
|
-
- uses: softprops/action-gh-release@v2
|
|
33
|
-
name: publish
|
|
34
|
-
with:
|
|
35
|
-
tag_name: ${{ steps.version.outputs.tag }}
|
|
36
|
-
generate_release_notes: true
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
name: Release
|
|
2
|
-
on:
|
|
3
|
-
workflow_call:
|
|
4
|
-
inputs:
|
|
5
|
-
version:
|
|
6
|
-
type: string
|
|
7
|
-
required: true
|
|
8
|
-
package:
|
|
9
|
-
type: string
|
|
10
|
-
required: true
|
|
11
|
-
cargo-release-args:
|
|
12
|
-
type: string
|
|
13
|
-
required: false
|
|
14
|
-
default: ''
|
|
15
|
-
jobs:
|
|
16
|
-
config:
|
|
17
|
-
runs-on: ${{ inputs.runner || vars.RUNNER }}
|
|
18
|
-
name: generate config
|
|
19
|
-
outputs:
|
|
20
|
-
config: ${{ steps.config.outputs.config }}
|
|
21
|
-
steps:
|
|
22
|
-
- name: config
|
|
23
|
-
id: config
|
|
24
|
-
uses: dougefresh/ci/.github/actions/rust-config@main
|
|
25
|
-
with:
|
|
26
|
-
arm64: ${{ vars.RUNNER_ARM64 }}
|
|
27
|
-
amd64: ${{ vars.RUNNER_AMD64 }}
|
|
28
|
-
# win: "windows-latest"
|
|
29
|
-
# mac: "macos-latest"
|
|
30
|
-
git_token: ${{ github.token }}
|
|
31
|
-
release:
|
|
32
|
-
needs: [config]
|
|
33
|
-
outputs:
|
|
34
|
-
tag: ${{ steps.release.outputs.tag }}
|
|
35
|
-
runs-on: ${{ vars.RUNNER }}
|
|
36
|
-
permissions:
|
|
37
|
-
contents: write
|
|
38
|
-
steps:
|
|
39
|
-
- name: Init
|
|
40
|
-
uses: dougefresh/ci/.github/actions/rust-init@main
|
|
41
|
-
with:
|
|
42
|
-
packages: ${{ toJSON(fromJSON(needs.config.outputs.config).global.packages) }}
|
|
43
|
-
- name: Install cargo-release
|
|
44
|
-
uses: taiki-e/install-action@v2
|
|
45
|
-
with:
|
|
46
|
-
tool: cargo-release
|
|
47
|
-
- name: Configure Git
|
|
48
|
-
run: |
|
|
49
|
-
git config --global user.name "github-actions[bot]"
|
|
50
|
-
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
|
51
|
-
- name: Release
|
|
52
|
-
id: release
|
|
53
|
-
env:
|
|
54
|
-
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
|
55
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
56
|
-
NO_PUBLISH: ${{ fromJSON(needs.config.outputs.config).release.cargoPublish && '' || '--no-publish' }}
|
|
57
|
-
run: |
|
|
58
|
-
cargo release \
|
|
59
|
-
--package ${{ inputs.package }} \
|
|
60
|
-
--execute \
|
|
61
|
-
--no-confirm ${NO_PUBLISH} \
|
|
62
|
-
${{ inputs.cargo-release-args }} ${{ inputs.version }}
|
|
63
|
-
|
|
64
|
-
TAG=$(git describe --tags --abbrev=0)
|
|
65
|
-
echo "tag=$TAG" >> $GITHUB_OUTPUT
|
|
66
|
-
make_latest="true"
|
|
67
|
-
case ${{ inputs.version }} in
|
|
68
|
-
alpha|beta|rc)
|
|
69
|
-
make_latest="false"
|
|
70
|
-
prerelease="true"
|
|
71
|
-
;;
|
|
72
|
-
*)
|
|
73
|
-
make_latest="true"
|
|
74
|
-
prerelease="false"
|
|
75
|
-
;;
|
|
76
|
-
esac
|
|
77
|
-
echo "make_latest=$make_latest" >> $GITHUB_OUTPUT
|
|
78
|
-
echo "prerelease=$prerelease" >> $GITHUB_OUTPUT
|
|
79
|
-
- name: Create GitHub Release
|
|
80
|
-
uses: softprops/action-gh-release@v2
|
|
81
|
-
with:
|
|
82
|
-
tag_name: ${{ steps.release.outputs.tag }}
|
|
83
|
-
generate_release_notes: true
|
|
84
|
-
make_latest: ${{ steps.release.outputs.make_latest }}
|
|
85
|
-
prerelease: ${{ steps.release.outputs.prerelease == 'true' }}
|
|
86
|
-
bin:
|
|
87
|
-
name: assets / ${{ matrix.target }}
|
|
88
|
-
if: ${{ fromJSON(needs.config.outputs.config).release.bin }}
|
|
89
|
-
needs: [config, release]
|
|
90
|
-
strategy:
|
|
91
|
-
matrix:
|
|
92
|
-
include: ${{ fromJSON(toJSON(fromJSON(needs.config.outputs.config).release.os)) }}
|
|
93
|
-
runs-on: ${{ matrix.os }}
|
|
94
|
-
steps:
|
|
95
|
-
- name: Init / ${{ matrix.target }}
|
|
96
|
-
uses: dougefresh/ci/.github/actions/rust-init@main
|
|
97
|
-
with:
|
|
98
|
-
packages: ${{ toJSON(fromJSON(needs.config.outputs.config).global.packages) }}
|
|
99
|
-
ref: ${{ needs.release.outputs.tag }}
|
|
100
|
-
- name: Build / ${{ matrix.target }}
|
|
101
|
-
id: build
|
|
102
|
-
run: |
|
|
103
|
-
if [ ${{ fromJSON(needs.config.outputs.config).release.debian }} == "true" ] && [ "${RUNNER_OS}" != "macOS" ]; then
|
|
104
|
-
cargo install cargo-deb
|
|
105
|
-
cargo deb --target ${{ matrix.target }}
|
|
106
|
-
echo _dpkg="$(ls target/debian/*.deb)" >> $GITHUB_OUTPUT
|
|
107
|
-
else
|
|
108
|
-
cargo build --release --target ${{ matrix.target }}
|
|
109
|
-
fi
|
|
110
|
-
echo _bin=target/${{ matrix.target }}/release/${{ fromJSON(needs.config.outputs.config).release.bin }} >> $GITHUB_OUTPUT
|
|
111
|
-
- name: Package / ${{ matrix.target }}
|
|
112
|
-
run: |
|
|
113
|
-
tar czf ${{ steps.build.outputs._bin }}-${{ matrix.target }}.tar.gz ${{ steps.build.outputs._bin }}
|
|
114
|
-
sha256sum ${{ steps.build.outputs._bin }}-${{ matrix.target }}.tar.gz > ${{ steps.build.outputs._bin }}-${{ matrix.target }}.tar.gz.sha256
|
|
115
|
-
- name: Hash Deb / ${{ matrix.target }}
|
|
116
|
-
if: ${{ steps.build.outputs._dpkg }}
|
|
117
|
-
run: |
|
|
118
|
-
sha256sum ${{ steps.build.outputs._dpkg }} > ${{ steps.build.outputs._dpkg }}.sha256
|
|
119
|
-
- name: Upload / ${{ matrix.target }}
|
|
120
|
-
uses: softprops/action-gh-release@v2
|
|
121
|
-
with:
|
|
122
|
-
tag_name: ${{ needs.release.outputs.tag }}
|
|
123
|
-
files: |
|
|
124
|
-
${{ steps.build.outputs._bin }}-${{ matrix.target }}.tar.gz
|
|
125
|
-
${{ steps.build.outputs._bin }}-${{ matrix.target }}.tar.gz.sha256
|
|
126
|
-
- name: Deb Upload / ${{ matrix.target }}
|
|
127
|
-
if: ${{ steps.build.outputs._dpkg }}
|
|
128
|
-
uses: softprops/action-gh-release@v2
|
|
129
|
-
with:
|
|
130
|
-
tag_name: ${{ needs.release.outputs.tag }}
|
|
131
|
-
files: |
|
|
132
|
-
${{ steps.build.outputs._dpkg }}
|
|
133
|
-
${{ steps.build.outputs._dpkg }}.sha256
|
|
@@ -1,247 +0,0 @@
|
|
|
1
|
-
on:
|
|
2
|
-
workflow_call:
|
|
3
|
-
inputs:
|
|
4
|
-
runner:
|
|
5
|
-
type: string
|
|
6
|
-
required: false
|
|
7
|
-
concurrency:
|
|
8
|
-
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
9
|
-
cancel-in-progress: true
|
|
10
|
-
name: check test
|
|
11
|
-
jobs:
|
|
12
|
-
config:
|
|
13
|
-
runs-on: ${{ inputs.runner || vars.RUNNER }}
|
|
14
|
-
name: generate config
|
|
15
|
-
outputs:
|
|
16
|
-
config: ${{ steps.config.outputs.config }}
|
|
17
|
-
steps:
|
|
18
|
-
- name: config
|
|
19
|
-
id: config
|
|
20
|
-
uses: dougefresh/ci/.github/actions/rust-config@main
|
|
21
|
-
with:
|
|
22
|
-
arm64: ${{ vars.RUNNER_ARM64 }}
|
|
23
|
-
amd64: ${{ vars.RUNNER_AMD64 }}
|
|
24
|
-
# win: "windows-latest"
|
|
25
|
-
# mac: "macos-latest"
|
|
26
|
-
git_token: ${{ github.token }}
|
|
27
|
-
coverage:
|
|
28
|
-
runs-on: ${{ matrix.os }}
|
|
29
|
-
needs: [config]
|
|
30
|
-
if: ${{ fromJSON(needs.config.outputs.config).jobs.coverage.if }}
|
|
31
|
-
name: coverage / ${{ matrix.features }} / ${{ matrix.os }} / ${{ matrix.toolchains }}
|
|
32
|
-
strategy:
|
|
33
|
-
fail-fast: false
|
|
34
|
-
matrix: ${{ fromJSON(toJSON(fromJSON(needs.config.outputs.config).jobs.coverage.matrix)) }}
|
|
35
|
-
steps:
|
|
36
|
-
- name: Init
|
|
37
|
-
uses: dougefresh/ci/.github/actions/rust-init@main
|
|
38
|
-
with:
|
|
39
|
-
packages: ${{ toJSON(fromJSON(needs.config.outputs.config).global.packages) }}
|
|
40
|
-
- name: llvm-tools
|
|
41
|
-
shell: bash
|
|
42
|
-
run: |
|
|
43
|
-
rustup default ${{ matrix.toolchains }}
|
|
44
|
-
rustup component add llvm-tools-preview
|
|
45
|
-
cargo install cargo-llvm-cov
|
|
46
|
-
- name: cargo generate-lockfile
|
|
47
|
-
if: hashFiles('Cargo.lock') == ''
|
|
48
|
-
run: cargo generate-lockfile
|
|
49
|
-
- name: llvm-cov (${{ matrix.features }})
|
|
50
|
-
run: |
|
|
51
|
-
${{ fromJSON(needs.config.outputs.config).jobs.coverage.run }}
|
|
52
|
-
env:
|
|
53
|
-
FEATURES: ${{ matrix.features }}
|
|
54
|
-
LLVM_ARGS: ${{ fromJSON(needs.config.outputs.config).jobs.coverage.args.llvm || '' }}
|
|
55
|
-
CARGO_ARGS: ${{ fromJSON(needs.config.outputs.config).jobs.coverage.args.test || '' }}
|
|
56
|
-
RUST_LOG: "${{ fromJSON(needs.config.outputs.config).global.rustlog || 'info' }}"
|
|
57
|
-
- name: Record Rust version
|
|
58
|
-
run: echo "RUST=$(rustc --version)" >> "$GITHUB_ENV"
|
|
59
|
-
- name: Upload to codecov.io
|
|
60
|
-
uses: codecov/codecov-action@v5
|
|
61
|
-
with:
|
|
62
|
-
fail_ci_if_error: true
|
|
63
|
-
token: ${{ secrets.CODECOV_TOKEN }}
|
|
64
|
-
files: lcov-${{ matrix.features }}.info
|
|
65
|
-
flags: ${{ matrix.features }}
|
|
66
|
-
env_vars: OS,RUST
|
|
67
|
-
fmt:
|
|
68
|
-
needs: [config]
|
|
69
|
-
runs-on: ${{ vars.RUNNER }}
|
|
70
|
-
name: fmt
|
|
71
|
-
if: ${{ fromJSON(needs.config.outputs.config).jobs.fmt.if }}
|
|
72
|
-
steps:
|
|
73
|
-
- name: Init
|
|
74
|
-
uses: dougefresh/ci/.github/actions/rust-init@main
|
|
75
|
-
- name: fmt
|
|
76
|
-
run: |
|
|
77
|
-
${{ fromJSON(needs.config.outputs.config).jobs.fmt.run }}
|
|
78
|
-
clippy:
|
|
79
|
-
needs: [config]
|
|
80
|
-
runs-on: ${{ matrix.os }}
|
|
81
|
-
if: ${{ fromJSON(needs.config.outputs.config).jobs.clippy.if }}
|
|
82
|
-
name: clippy / ${{ matrix.features }} / ${{ matrix.os }}
|
|
83
|
-
permissions:
|
|
84
|
-
contents: read
|
|
85
|
-
checks: write
|
|
86
|
-
strategy:
|
|
87
|
-
fail-fast: false
|
|
88
|
-
matrix: ${{ fromJSON(toJSON(fromJSON(needs.config.outputs.config).jobs.clippy.matrix)) }}
|
|
89
|
-
steps:
|
|
90
|
-
- name: Init
|
|
91
|
-
uses: dougefresh/ci/.github/actions/rust-init@main
|
|
92
|
-
with:
|
|
93
|
-
packages: ${{ toJSON(fromJSON(needs.config.outputs.config).global.packages) }}
|
|
94
|
-
- name: clippy / ${{ matrix.features }}
|
|
95
|
-
uses: giraffate/clippy-action@v1
|
|
96
|
-
with:
|
|
97
|
-
reporter: 'github-pr-check'
|
|
98
|
-
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
99
|
-
tool_name: clippy-${{ matrix.toolchains }}-${{ matrix.features }}
|
|
100
|
-
clippy_flags: ${{ matrix.features != 'default' && format('--features {0}', matrix.features) || '' }}
|
|
101
|
-
semver:
|
|
102
|
-
needs: [config]
|
|
103
|
-
runs-on: ${{ vars.RUNNER_AMD64 }}
|
|
104
|
-
name: semver
|
|
105
|
-
if: ${{ fromJSON(needs.config.outputs.config).jobs.semver.if }}
|
|
106
|
-
steps:
|
|
107
|
-
- name: Init
|
|
108
|
-
uses: dougefresh/ci/.github/actions/rust-init@main
|
|
109
|
-
with:
|
|
110
|
-
packages: ${{ toJSON(fromJSON(needs.config.outputs.config).global.packages) }}
|
|
111
|
-
- name: cargo-semver-checks
|
|
112
|
-
uses: obi1kenobi/cargo-semver-checks-action@v2
|
|
113
|
-
hack:
|
|
114
|
-
needs: [config]
|
|
115
|
-
# cargo-hack checks combinations of feature flags to ensure that features are all additive
|
|
116
|
-
# which is required for feature unification
|
|
117
|
-
runs-on: ${{ vars.RUNNER }}
|
|
118
|
-
name: hack
|
|
119
|
-
if: ${{ fromJSON(needs.config.outputs.config).jobs.hack.if }}
|
|
120
|
-
steps:
|
|
121
|
-
- name: Init
|
|
122
|
-
uses: dougefresh/ci/.github/actions/rust-init@main
|
|
123
|
-
with:
|
|
124
|
-
packages: ${{ toJSON(fromJSON(needs.config.outputs.config).global.packages) }}
|
|
125
|
-
- name: Install cargo-hack
|
|
126
|
-
uses: baptiste0928/cargo-install@v3
|
|
127
|
-
with:
|
|
128
|
-
crate: cargo-hack
|
|
129
|
-
locked: false
|
|
130
|
-
# intentionally no target specifier; see https://github.com/jonhoo/rust-ci-conf/pull/4
|
|
131
|
-
# --feature-powerset runs for every combination of features
|
|
132
|
-
- name: cargo hack
|
|
133
|
-
run: cargo hack --feature-powerset check
|
|
134
|
-
doc:
|
|
135
|
-
needs: [config]
|
|
136
|
-
runs-on: ${{ vars.RUNNER }}
|
|
137
|
-
name: doc
|
|
138
|
-
if: ${{ fromJSON(needs.config.outputs.config).jobs.docCheck.if }}
|
|
139
|
-
steps:
|
|
140
|
-
- name: Init
|
|
141
|
-
uses: dougefresh/ci/.github/actions/rust-init@main
|
|
142
|
-
with:
|
|
143
|
-
packages: ${{ toJSON(fromJSON(needs.config.outputs.config).global.packages) }}
|
|
144
|
-
- name: Install cargo-docs-rs
|
|
145
|
-
uses: baptiste0928/cargo-install@v3
|
|
146
|
-
with:
|
|
147
|
-
crate: cargo-docs-rs
|
|
148
|
-
locked: false
|
|
149
|
-
- name: cargo docs-rs
|
|
150
|
-
run: |
|
|
151
|
-
${{ fromJSON(needs.config.outputs.config).jobs.dockCheck.run }}
|
|
152
|
-
cargo-sort:
|
|
153
|
-
needs: [config]
|
|
154
|
-
runs-on: ${{ vars.RUNNER }}
|
|
155
|
-
name: cargo-sort
|
|
156
|
-
if: ${{ fromJSON(needs.config.outputs.config).jobs.cargoSort.if }}
|
|
157
|
-
steps:
|
|
158
|
-
- name: Init
|
|
159
|
-
uses: dougefresh/ci/.github/actions/rust-init@main
|
|
160
|
-
- name: Install cargo-sort
|
|
161
|
-
uses: baptiste0928/cargo-install@v3
|
|
162
|
-
with:
|
|
163
|
-
crate: cargo-sort
|
|
164
|
-
locked: false
|
|
165
|
-
- name: Check `Cargo.toml` sort
|
|
166
|
-
run: |
|
|
167
|
-
${{ fromJSON(needs.config.outputs.config).jobs.cargoSort.run }}
|
|
168
|
-
dependencies:
|
|
169
|
-
needs: [config]
|
|
170
|
-
runs-on: ${{ vars.RUNNER }}
|
|
171
|
-
name: check unused deps
|
|
172
|
-
if: ${{ fromJSON(needs.config.outputs.config).jobs.dependencies.if }}
|
|
173
|
-
steps:
|
|
174
|
-
- name: Init
|
|
175
|
-
uses: dougefresh/ci/.github/actions/rust-init@main
|
|
176
|
-
- name: Install cargo-machete
|
|
177
|
-
uses: baptiste0928/cargo-install@v3
|
|
178
|
-
with:
|
|
179
|
-
crate: cargo-machete
|
|
180
|
-
locked: false
|
|
181
|
-
- name: Check unused Cargo dependencies
|
|
182
|
-
run: |
|
|
183
|
-
${{ fromJSON(needs.config.outputs.config).jobs.dependencies.run }}
|
|
184
|
-
sanitizers:
|
|
185
|
-
if: ${{ fromJSON(needs.config.outputs.config).jobs.sanitizers.enabled }}
|
|
186
|
-
name: sanitizers
|
|
187
|
-
runs-on: ${{ vars.RUNNER }}
|
|
188
|
-
needs: [config, coverage]
|
|
189
|
-
steps:
|
|
190
|
-
- name: Init
|
|
191
|
-
uses: dougefresh/ci/.github/actions/rust-init@main
|
|
192
|
-
with:
|
|
193
|
-
packages: ${{ toJSON(fromJSON(needs.config.outputs.config).global.packages) }}
|
|
194
|
-
- name: Enable debug symbols
|
|
195
|
-
run: |
|
|
196
|
-
#rustup target add x86_64-unknown-linux-gnu
|
|
197
|
-
echo _rust_target=aarch64-unknown-linux-gnu >> $GITHUB_ENV
|
|
198
|
-
rustup default nightly
|
|
199
|
-
# to get the symbolizer for debug symbol resolution
|
|
200
|
-
sudo apt install llvm
|
|
201
|
-
# to fix buggy leak analyzer:
|
|
202
|
-
# https://github.com/japaric/rust-san#unrealiable-leaksanitizer
|
|
203
|
-
# ensure there's a profile.dev section
|
|
204
|
-
if ! grep -qE '^[ \t]*[profile.dev]' Cargo.toml; then
|
|
205
|
-
echo >> Cargo.toml
|
|
206
|
-
echo '[profile.dev]' >> Cargo.toml
|
|
207
|
-
fi
|
|
208
|
-
# remove pre-existing opt-levels in profile.dev
|
|
209
|
-
sed -i '/^\s*\[profile.dev\]/,/^\s*\[/ {/^\s*opt-level/d}' Cargo.toml
|
|
210
|
-
# now set opt-level to 1
|
|
211
|
-
sed -i '/^\s*\[profile.dev\]/a opt-level = 1' Cargo.toml
|
|
212
|
-
- name: cargo test -Zsanitizer=address
|
|
213
|
-
if: ${{ fromJSON(needs.config.outputs.config).jobs.sanitizers.address.if }}
|
|
214
|
-
# only --lib --tests b/c of https://github.com/rust-lang/rust/issues/53945
|
|
215
|
-
run: |
|
|
216
|
-
cargo test --lib --tests --no-fail-fast --target ${_rust_target} -- --no-capture
|
|
217
|
-
env:
|
|
218
|
-
ASAN_OPTIONS: 'detect_odr_violation=0:detect_leaks=0'
|
|
219
|
-
RUSTFLAGS: '-Z sanitizer=address'
|
|
220
|
-
- name: cargo test -Zsanitizer=leak
|
|
221
|
-
if: ${{ fromJSON(needs.config.outputs.config).jobs.sanitizers.leak.if }}
|
|
222
|
-
run: |
|
|
223
|
-
cargo test --target ${_rust_target} -- --no-capture
|
|
224
|
-
env:
|
|
225
|
-
LSAN_OPTIONS: 'suppressions=lsan-suppressions.txt'
|
|
226
|
-
RUSTFLAGS: '-Z sanitizer=leak'
|
|
227
|
-
- name: cargo test -Zsanitizer=thread
|
|
228
|
-
if: ${{ fromJSON(needs.config.outputs.config).jobs.sanitizers.thread.if }}
|
|
229
|
-
run: cargo test --target ${_rust_target} -- --test-threads=1 --no-capture
|
|
230
|
-
env:
|
|
231
|
-
RUSTFLAGS: '-Z sanitizer=thread'
|
|
232
|
-
extra:
|
|
233
|
-
needs: [config]
|
|
234
|
-
runs-on: ${{ matrix.os }}
|
|
235
|
-
name: ${{ fromJSON(needs.config.outputs.config).jobs.extra.name }}
|
|
236
|
-
if: ${{ fromJSON(needs.config.outputs.config).jobs.extra.if }}
|
|
237
|
-
strategy:
|
|
238
|
-
fail-fast: false
|
|
239
|
-
matrix: ${{ fromJSON(toJSON(fromJSON(needs.config.outputs.config).jobs.extra.matrix)) }}
|
|
240
|
-
steps:
|
|
241
|
-
- name: Init
|
|
242
|
-
uses: dougefresh/ci/.github/actions/rust-init@main
|
|
243
|
-
with:
|
|
244
|
-
packages: ${{ toJSON(fromJSON(needs.config.outputs.config).global.packages) }}
|
|
245
|
-
- name: ${{ fromJSON(needs.config.outputs.config).jobs.extra.name }} / ${{ matrix.os }}
|
|
246
|
-
run: |
|
|
247
|
-
${{ fromJSON(needs.config.outputs.config).jobs.extra.run }}
|
package/.node-version
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
24
|