Skip to content

Commit 9499b69

Browse files
committed
various CI fixes
1 parent d8a6c74 commit 9499b69

3 files changed

Lines changed: 26 additions & 16 deletions

File tree

.github/workflows/binary-builds.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,17 @@ jobs:
142142
if: runner.os != 'Windows'
143143
shell: bash
144144
run: |-
145+
mkdir dist
146+
cp LICENSE dist/LICENSE
147+
cd dist
148+
145149
tgt="cpp-linter"
146-
mv "target/${{ matrix.target }}/release/${tgt}" "${tgt}"
150+
mv "../target/${{ matrix.target }}/release/${tgt}" "./${tgt}"
147151
arc_name="${tgt}-${{ matrix.target }}.tar.gz"
148152
tar -a -c -v -z -f "${arc_name}" ${tgt} LICENSE
149153
150154
tgt="clang-tools"
151-
mv "target/${{ matrix.target }}/release/${tgt}" "${tgt}"
155+
mv "../target/${{ matrix.target }}/release/${tgt}" "./${tgt}"
152156
arc_name="${tgt}-${{ matrix.target }}.tar.gz"
153157
tar -a -c -v -z -f "${arc_name}" ${tgt} LICENSE
154158
- name: Prepare artifacts (windows)
@@ -157,26 +161,30 @@ jobs:
157161
# `tar.exe` in powershell is different from `tar` in bash.
158162
# need to use `tar.exe` in powershell to create a valid zip file.
159163
run: |-
164+
mkdir dist
165+
Copy-Item ./LICENSE ./dist/LICENSE
166+
cd dist
167+
160168
$tgt = "cpp-linter"
161-
mv "target/${{ matrix.target }}/release/${tgt}.exe" "${tgt}.exe"
169+
mv "../target/${{ matrix.target }}/release/${tgt}.exe" "./${tgt}.exe"
162170
$arc_name = "${tgt}-${{ matrix.target }}.zip"
163-
tar -a -c -v -f "${arc_name}" ${tgt} LICENSE
171+
tar -a -c -v -f "${arc_name}" ${tgt}.exe LICENSE
164172
165173
$tgt = "clang-tools"
166-
mv "target/${{ matrix.target }}/release/${tgt}.exe" "${tgt}.exe"
174+
mv "../target/${{ matrix.target }}/release/${tgt}.exe" "./${tgt}.exe"
167175
$arc_name = "${tgt}-${{ matrix.target }}.zip"
168-
tar -a -c -v -f "${arc_name}" ${tgt} LICENSE
176+
tar -a -c -v -f "${arc_name}" ${tgt}.exe LICENSE
169177
- name: Upload cpp-linter artifacts
170178
uses: actions/upload-artifact@v7
171179
with:
172180
name: cpp-linter-${{ matrix.target }}
173-
path: cpp-linter-${{ matrix.target }}*
181+
path: dist/cpp-linter-${{ matrix.target }}*
174182
if-no-files-found: error
175183
- name: Upload clang-tools artifacts
176184
uses: actions/upload-artifact@v7
177185
with:
178186
name: clang-tools-${{ matrix.target }}
179-
path: clang-tools-${{ matrix.target }}*
187+
path: dist/clang-tools-${{ matrix.target }}*
180188
if-no-files-found: error
181189

182190
publish:

.github/workflows/bump-n-release.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
if: github.event_name != 'workflow_dispatch' && !startsWith(github.ref, 'refs/tags/')
7676
runs-on: ubuntu-latest
7777
outputs:
78-
pkgs: ${{ steps.set-pkgs.outputs.pkgs }}
78+
pkgs: ${{ steps.get-pkgs.outputs.pkgs }}
7979
steps:
8080
- uses: actions/checkout@v6
8181
with:
@@ -84,15 +84,17 @@ jobs:
8484
- name: Install nushell
8585
uses: hustcer/setup-nu@92c296ba1ba2ba04cc948ab64ddefe192dc13f0c # v3.23
8686
- name: Get changed packages
87-
id: set-pkgs
87+
id: get-pkgs
8888
shell: nu {0}
8989
run: |-
90-
source .github/workflows/bump-n-release.nu
91-
let pkgs = get-changed-pkgs.nu
92-
"pkgs=($pkgs)\n" | save --append $env.GITHUB_OUTPUT
90+
print (pwd)
91+
use ("./.github/workflows/bump-n-release.nu" | path expand) get-changed-pkgs
92+
let pkgs = (get-changed-pkgs)
93+
$"pkgs=($pkgs)\n" | save --append $env.GITHUB_OUTPUT
94+
9395
update-changelog:
9496
if: github.event_name != 'workflow_dispatch'
95-
needs: get-changed-pkgs
97+
needs: [get-changed-pkgs]
9698
permissions:
9799
contents: read
98100
pull-requests: read
@@ -120,7 +122,7 @@ jobs:
120122
GIT_CLIFF_CONFIG: .config/cliff.toml
121123
shell: nu {0}
122124
run: |-
123-
source .github/workflows/bump-n-release.nu
125+
use ("./.github/workflows/bump-n-release.nu" | path expand) gen-changes
124126
gen-changes $env.PKG --unreleased
125127
let out = open --raw .config/ReleaseNotes.md
126128
$"## ($env.PKG)\n\n($out)" | save --append $env.GITHUB_STEP_SUMMARY

benchmark/benchmark.nu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# nu benchmark/benchmark.nu
1010
# To use this script in CI, see .github/workflows/benchmark.yml.
1111

12-
use "../nurfile" run-cmd
12+
use "../.github/common.nu" run-cmd
1313

1414
# Build release version of cpp-linter (rust) binary
1515
#

0 commit comments

Comments
 (0)