Skip to content

fix: serve the website from the enclave.eclipse.dev root (#55) #111

fix: serve the website from the enclave.eclipse.dev root (#55)

fix: serve the website from the enclave.eclipse.dev root (#55) #111

Workflow file for this run

name: CI
on:
push:
branches: [main]
paths-ignore:
- 'docs/**'
- '*.md'
pull_request:
paths-ignore:
- 'docs/**'
- '*.md'
permissions:
contents: read
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
with:
go-version-file: go.mod
- name: Build CLI
run: CGO_ENABLED=0 go build ./cmd/enclave
- name: Smoke test standalone binary
run: ./scripts/smoke-standalone-binary.sh ./enclave
- name: Cross-compile (macOS, Linux arm64, and Windows)
run: make cross-build
- name: Vet
run: go vet ./...
- name: Test
run: go test ./...
smoke-macos:
runs-on: macos-15
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
with:
go-version-file: go.mod
- name: Build CLI
run: CGO_ENABLED=0 go build -o enclave-darwin-arm64 ./cmd/enclave
- name: Smoke test standalone binary
run: ./scripts/smoke-standalone-binary.sh ./enclave-darwin-arm64
# The Windows binary is the WSL launcher. GitHub-hosted windows runners have no
# WSL2, so this job covers everything that does not need it; the empirical
# wsl.exe round trip is the manual gate in scripts/wsl-shim-verify.ps1.
build-and-test-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
with:
go-version-file: go.mod
- name: Build launcher
run: go build ./cmd/enclave
- name: Vet
run: go vet ./...
- name: Test launcher
run: go test ./internal/wslshim/...
- name: Parse verification script
shell: pwsh
run: |
$errors = $null
[System.Management.Automation.Language.Parser]::ParseFile(
"$PWD/scripts/wsl-shim-verify.ps1", [ref]$null, [ref]$errors) | Out-Null
if ($errors) { $errors; exit 1 }
Write-Host 'scripts/wsl-shim-verify.ps1 parsed cleanly.'
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
with:
go-version-file: go.mod
- name: Install shellcheck
run: |
sudo apt-get update
sudo apt-get install -y shellcheck
- name: Add Go tool bin to PATH
run: echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Install Go lint tools
run: ./extensions/features/devtools/install.sh
- name: Cache lint caches
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
.tmp/go-build
.tmp/golangci-lint-cache
key: lint-${{ runner.os }}-${{ hashFiles('go.sum') }}
restore-keys: |
lint-${{ runner.os }}-
- name: Lint
run: make lint