ci: smoke test release archives
This commit is contained in:
parent
8e3b45db1b
commit
89b39ee2aa
5 changed files with 245 additions and 6 deletions
31
.github/workflows/release.yml
vendored
31
.github/workflows/release.yml
vendored
|
|
@ -59,9 +59,25 @@ jobs:
|
|||
mkdir -p "${pkg}" dist
|
||||
cp "target/release/${{ matrix.binary }}" "${pkg}/"
|
||||
cp README.md "${pkg}/"
|
||||
cp LICENSE-* "${pkg}/"
|
||||
cp -R docs "${pkg}/docs"
|
||||
tar -czf "dist/${pkg}.tar.gz" "${pkg}"
|
||||
|
||||
- name: Smoke-test Unix artifact
|
||||
if: runner.os != 'Windows'
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
version="${GITHUB_REF_NAME:-manual}"
|
||||
pkg="geth-${version}-${{ matrix.target }}"
|
||||
mkdir -p smoke
|
||||
tar -xzf "dist/${pkg}.tar.gz" -C smoke
|
||||
"smoke/${pkg}/${{ matrix.binary }}" --version
|
||||
test -f "smoke/${pkg}/README.md"
|
||||
test -f "smoke/${pkg}/LICENSE-MIT"
|
||||
test -f "smoke/${pkg}/LICENSE-APACHE"
|
||||
test -d "smoke/${pkg}/docs"
|
||||
|
||||
- name: Package Windows artifact
|
||||
if: runner.os == 'Windows'
|
||||
shell: pwsh
|
||||
|
|
@ -71,9 +87,24 @@ jobs:
|
|||
New-Item -ItemType Directory -Force -Path $pkg, dist | Out-Null
|
||||
Copy-Item "target/release/${{ matrix.binary }}" "$pkg/"
|
||||
Copy-Item README.md "$pkg/"
|
||||
Copy-Item LICENSE-* "$pkg/"
|
||||
Copy-Item docs "$pkg/docs" -Recurse
|
||||
Compress-Archive -Path "$pkg/*" -DestinationPath "dist/$pkg.zip" -Force
|
||||
|
||||
- name: Smoke-test Windows artifact
|
||||
if: runner.os == 'Windows'
|
||||
shell: pwsh
|
||||
run: |
|
||||
$version = if ($env:GITHUB_REF_NAME) { $env:GITHUB_REF_NAME } else { "manual" }
|
||||
$pkg = "geth-$version-${{ matrix.target }}"
|
||||
New-Item -ItemType Directory -Force -Path smoke | Out-Null
|
||||
Expand-Archive -Path "dist/$pkg.zip" -DestinationPath "smoke/$pkg" -Force
|
||||
& "smoke/$pkg/${{ matrix.binary }}" --version
|
||||
if (!(Test-Path "smoke/$pkg/README.md")) { throw "README.md missing from archive" }
|
||||
if (!(Test-Path "smoke/$pkg/LICENSE-MIT")) { throw "LICENSE-MIT missing from archive" }
|
||||
if (!(Test-Path "smoke/$pkg/LICENSE-APACHE")) { throw "LICENSE-APACHE missing from archive" }
|
||||
if (!(Test-Path "smoke/$pkg/docs")) { throw "docs missing from archive" }
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
|
|
|||
Loading…
Reference in a new issue