ci(release test):test with hello
This commit is contained in:
70
.github/workflows/release-build.yml
vendored
70
.github/workflows/release-build.yml
vendored
@@ -88,23 +88,6 @@ jobs:
|
|||||||
ghcr.io/goreleaser/goreleaser-cross:v1.22 \
|
ghcr.io/goreleaser/goreleaser-cross:v1.22 \
|
||||||
release --skip=publish,nfpm,snapcraft --snapshot --clean
|
release --skip=publish,nfpm,snapcraft --snapshot --clean
|
||||||
|
|
||||||
- name: Debug - Check Generated Files
|
|
||||||
run: |
|
|
||||||
echo "=== Listing .dist/ directory ==="
|
|
||||||
find .dist/ -name "*.tar.gz" -type f
|
|
||||||
echo ""
|
|
||||||
echo "=== Looking for darwin-amd64 files ==="
|
|
||||||
find .dist/ -name "*darwin-amd64*" -type f
|
|
||||||
echo ""
|
|
||||||
echo "=== Looking for darwin-arm64 files ==="
|
|
||||||
find .dist/ -name "*darwin-arm64*" -type f
|
|
||||||
echo ""
|
|
||||||
echo "=== Looking for linux files ==="
|
|
||||||
find .dist/ -name "*linux*" -type f
|
|
||||||
echo ""
|
|
||||||
echo "=== All files in .dist/ ==="
|
|
||||||
ls -la .dist/
|
|
||||||
|
|
||||||
- name: Upload Darwin AMD64 Artifacts
|
- name: Upload Darwin AMD64 Artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
@@ -153,20 +136,32 @@ jobs:
|
|||||||
- os: macos-13
|
- os: macos-13
|
||||||
goos: darwin
|
goos: darwin
|
||||||
goarch: amd64
|
goarch: amd64
|
||||||
|
go-version: "1.24.2"
|
||||||
|
go-mod-version: "1.24"
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
goos: darwin
|
goos: darwin
|
||||||
goarch: arm64
|
goarch: arm64
|
||||||
|
go-version: "1.24.2"
|
||||||
|
go-mod-version: "1.24"
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
goos: linux
|
goos: linux
|
||||||
goarch: amd64
|
goarch: amd64
|
||||||
|
go-version: "1.24.2"
|
||||||
|
go-mod-version: "1.24"
|
||||||
- os: ubuntu-24.04-arm
|
- os: ubuntu-24.04-arm
|
||||||
goos: linux
|
goos: linux
|
||||||
goarch: arm64
|
goarch: arm64
|
||||||
|
go-version: "1.24.2"
|
||||||
|
go-mod-version: "1.24"
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
uses: ./.github/actions/setup-deps
|
uses: ./.github/actions/setup-deps
|
||||||
|
- name: Set up Go for building llgo
|
||||||
|
uses: ./.github/actions/setup-go
|
||||||
|
with:
|
||||||
|
go-version: "1.24.2"
|
||||||
- name: Download Platform Artifact
|
- name: Download Platform Artifact
|
||||||
uses: actions/download-artifact@v5
|
uses: actions/download-artifact@v5
|
||||||
with:
|
with:
|
||||||
@@ -176,40 +171,17 @@ jobs:
|
|||||||
- name: Extract LLGO Archive
|
- name: Extract LLGO Archive
|
||||||
run: |
|
run: |
|
||||||
echo "Looking for ${{ matrix.goos }}_${{ matrix.goarch }} archive..."
|
echo "Looking for ${{ matrix.goos }}_${{ matrix.goarch }} archive..."
|
||||||
ls -la
|
|
||||||
|
|
||||||
# Find the tar.gz file (should be only one)
|
|
||||||
ARCHIVE=$(ls *.tar.gz | head -n1)
|
ARCHIVE=$(ls *.tar.gz | head -n1)
|
||||||
if [ -z "$ARCHIVE" ]; then
|
mkdir -p release-llgo
|
||||||
echo "No archive found for platform ${{ matrix.goos }}_${{ matrix.goarch }}"
|
tar -xzf "$ARCHIVE" -C release-llgo
|
||||||
exit 1
|
ls -la release-llgo/
|
||||||
fi
|
echo "${{ github.workspace }}/release-llgo/bin/" >> $GITHUB_PATH
|
||||||
|
|
||||||
echo "Found archive: $ARCHIVE"
|
- name: Test Hello World with go.mod 1.21
|
||||||
mkdir -p extracted
|
uses: ./.github/actions/test-helloworld
|
||||||
tar -xzf "$ARCHIVE" -C extracted
|
with:
|
||||||
ls -la extracted/
|
go-version: ${{matrix.go-version}}
|
||||||
|
mod-version: ${{ matrix.go-mod-version }}
|
||||||
- name: Test LLGO Binary
|
|
||||||
run: |
|
|
||||||
# Find the llgo binary in the extracted files
|
|
||||||
LLGO_BIN=$(find extracted/ -name "llgo" -type f | head -n1)
|
|
||||||
if [ -z "$LLGO_BIN" ]; then
|
|
||||||
echo "llgo binary not found"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Found llgo binary: $LLGO_BIN"
|
|
||||||
chmod +x "$LLGO_BIN"
|
|
||||||
|
|
||||||
# Test basic functionality
|
|
||||||
echo "Testing llgo version..."
|
|
||||||
"$LLGO_BIN" version
|
|
||||||
|
|
||||||
echo "Testing llgo help..."
|
|
||||||
"$LLGO_BIN" --help
|
|
||||||
|
|
||||||
echo "LLGO binary test passed for ${{ matrix.goos }}_${{ matrix.goarch }}"
|
|
||||||
|
|
||||||
release:
|
release:
|
||||||
needs: [build, test-artifacts]
|
needs: [build, test-artifacts]
|
||||||
|
|||||||
Reference in New Issue
Block a user