Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
80 changes: 80 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: CI

on:
push:
branches: [dev, main]
pull_request:
branches: [dev, main]

permissions:
contents: read

env:
GOFLAGS: -buildvcs=false
GOWORK: "off"
GOPROXY: "direct"
GOSUMDB: "off"

jobs:
test:
name: Test + Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: actions/setup-go@v6
with:
go-version: '1.26'
- name: Test with coverage
working-directory: go
run: go test -race -coverprofile=coverage.out -covermode=atomic -count=1 ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: go/coverage.out
flags: unittests
fail_ci_if_error: false

lint:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version: '1.26'
- uses: golangci/golangci-lint-action@v9
with:
version: latest
working-directory: go
args: --timeout=5m --tests=false

sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: actions/setup-go@v6
with:
go-version: '1.26'
- name: Test for coverage
working-directory: go
run: go test -coverprofile=coverage.out -covermode=atomic -count=1 ./...
- name: SonarCloud Scan
uses: SonarSource/sonarqube-scan-action@v6
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.organization=dappcore
-Dsonar.projectKey=dappcore_go-build
-Dsonar.sources=go
-Dsonar.exclusions=**/vendor/**,**/third_party/**,**/.tmp/**,**/*_test.go
-Dsonar.tests=go
-Dsonar.test.inclusions=**/*_test.go
-Dsonar.go.coverage.reportPaths=go/coverage.out
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "external/go"]
path = external/go
url = https://github.com/dappcore/go.git
branch = dev
4 changes: 2 additions & 2 deletions .woodpecker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ steps:
GOFLAGS: -buildvcs=false
GOWORK: "off"
commands:
- golangci-lint run --timeout=5m ./...
- cd go && golangci-lint run --timeout=5m ./...

- name: go-test
image: golang:1.26-alpine
Expand All @@ -25,7 +25,7 @@ steps:
CGO_ENABLED: "1"
commands:
- apk add --no-cache git build-base
- go test -race -coverprofile=coverage.out -covermode=atomic -count=1 ./...
- cd go && go test -race -coverprofile=coverage.out -covermode=atomic -count=1 ./...
- name: sonar
image: sonarsource/sonar-scanner-cli:latest
depends_on: [go-test]
Expand Down
42 changes: 42 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,48 @@ go test ./pkg/build/... -run TestWorkflow_WriteReleaseWorkflow_Good
go test ./pkg/build/... -run TestApple_
```

## Repo Layout

```
core/go-build/
├── go/ ← Go module root (module dappco.re/go/build)
│ ├── cmd/ ← CLI entry points
│ ├── internal/ ← Go internal packages
│ ├── pkg/ ← Go library packages
│ ├── tests/ ← Go tests/fixtures
│ │ └── cli/
│ ├── go.mod
│ ├── go.sum
│ ├── CLAUDE.md ← symlink to root CLAUDE.md
│ ├── README.md ← symlink to root README.md
│ ├── AGENTS.md ← symlink to root AGENTS.md
│ └── docs ← symlink to root docs/
├── docs/ ← cross-language docs (symlinked into go/)
├── locales/ ← locale content
├── ui/ ← language-specific UI
├── README.md
├── CLAUDE.md
├── AGENTS.md
└── ...
```

Future language siblings are expected at repo root (`php/`, `ts/`, `py/`) while Go stays in `go/`.

## Go Resolution Modes

This repo is intentionally non-workspace: a single Go module under `go/`.

| Mode | When | What runs |
|------|------|-----------|
| **Local module mode** | Standard local commands from repo root via `cd go` | Uses `go/ go.mod` and cached dependencies in module mode. |
| **`GOWORK=off`** | CI and reproducible verification | Uses `go/` module graph directly, without workspace indirection. |

```bash
cd go
go mod tidy
GOWORK=off GOFLAGS=-mod=mod go test -count=1 -short ./...
```

## Main Packages

- `pkg/build/`: discovery, config loading, caches, checksums, archives, workflow generation, Apple implementation
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
<!-- SPDX-License-Identifier: EUPL-1.2 -->

# go-build

> Go build orchestrator — cmd, project detection, release publishers

[![CI](https://github.com/dappcore/go-build/actions/workflows/ci.yml/badge.svg?branch=dev)](https://github.com/dappcore/go-build/actions/workflows/ci.yml)
[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=dappcore_go-build&metric=alert_status)](https://sonarcloud.io/dashboard?id=dappcore_go-build)
[![Coverage](https://codecov.io/gh/dappcore/go-build/branch/dev/graph/badge.svg)](https://codecov.io/gh/dappcore/go-build)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=dappcore_go-build&metric=security_rating)](https://sonarcloud.io/dashboard?id=dappcore_go-build)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=dappcore_go-build&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=dappcore_go-build)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=dappcore_go-build&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=dappcore_go-build)
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=dappcore_go-build&metric=code_smells)](https://sonarcloud.io/dashboard?id=dappcore_go-build)
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=dappcore_go-build&metric=ncloc)](https://sonarcloud.io/dashboard?id=dappcore_go-build)
[![Go Reference](https://pkg.go.dev/badge/dappco.re/go/go-build.svg)](https://pkg.go.dev/dappco.re/go/go-build)
[![License: EUPL-1.2](https://img.shields.io/badge/License-EUPL--1.2-blue.svg)](https://eupl.eu/1.2/en/)


`dappco.re/go/build` is the build, release, SDK, Apple packaging, and workflow toolkit behind `core build`, `core release`, `core sdk`, `core ci`, and the public `dAppCore/build@v3` GitHub Action surface.

## What It Covers
Expand Down
20 changes: 0 additions & 20 deletions cmd/build/ci_output.go

This file was deleted.

10 changes: 0 additions & 10 deletions cmd/build/ci_output_test.go

This file was deleted.

Loading
Loading