1.0.0-RC: hexagonal core/adapter/compose rewrite #111
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PR CI | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - master | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: Test (ubuntu) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| submodules: recursive | |
| - name: Setup Go | |
| uses: actions/setup-go@v7 | |
| with: | |
| go-version-file: go.mod | |
| - name: Install libpcap headers (Linux) | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libpcap-dev | |
| - name: Setup SPA | |
| uses: ./.github/actions/setup-spa | |
| - name: Run unit tests | |
| shell: bash | |
| run: bash scripts/ci/test.sh | |
| quality: | |
| name: Quality (vet + race + lint + vuln) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| submodules: recursive | |
| - name: Setup Go | |
| uses: actions/setup-go@v7 | |
| with: | |
| go-version-file: go.mod | |
| - name: Install libpcap headers | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libpcap-dev | |
| - name: Setup SPA | |
| uses: ./.github/actions/setup-spa | |
| - name: Race-enabled tests | |
| run: go test -tags all -race -count=1 ./... | |
| # golangci-lint runs via its dedicated action (caching, problem matchers) | |
| # rather than from quality.sh, so it can hook into the GitHub UI; the | |
| # script tolerates it being absent so a local run still covers vet/vuln/ | |
| # gosec. The vet + govulncheck + gosec gates are shared with local | |
| # development via scripts/ci/quality.sh / `make quality`. | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v8 | |
| with: | |
| version: latest | |
| args: --build-tags=all | |
| - name: Quality gates (vet + govulncheck + gosec) | |
| shell: bash | |
| env: | |
| SKIP_LINT: "1" # golangci-lint already ran via its action above | |
| run: bash scripts/ci/quality.sh | |
| build-tags: | |
| name: Build-tag matrix | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| tags: | |
| - "" | |
| - "afp" | |
| - "afp macgarden" | |
| - "afp macip" | |
| - "afp macgarden macip" | |
| - "afp sqlite_cnid" | |
| - "all" | |
| - "ipx netbeui smb" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| submodules: recursive | |
| - name: Setup Go | |
| uses: actions/setup-go@v7 | |
| with: | |
| go-version-file: go.mod | |
| - name: Install libpcap headers | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libpcap-dev | |
| - name: Setup SPA | |
| if: contains(matrix.tags, 'all') | |
| uses: ./.github/actions/setup-spa | |
| - name: Build with tags="${{ matrix.tags }}" | |
| run: go build -tags "${{ matrix.tags }}" ./... | |
| build: | |
| name: Build (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| script: bash scripts/ci/build.sh | |
| output: out/classicstack | |
| - os: macos-latest | |
| script: bash scripts/ci/build.sh | |
| output: out/classicstack | |
| - os: windows-latest | |
| script: ./scripts/ci/build.ps1 | |
| output: out/classicstack.exe | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| submodules: recursive | |
| - name: Setup Go | |
| uses: actions/setup-go@v7 | |
| with: | |
| go-version-file: go.mod | |
| - name: Install libpcap headers (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libpcap-dev libfuse-dev | |
| - name: Setup SPA | |
| uses: ./.github/actions/setup-spa | |
| - name: Build classicstack (Linux/macOS) | |
| if: runner.os != 'Windows' | |
| shell: bash | |
| env: | |
| BUILD_VERSION: 0.0.0-pr.${{ github.run_number }} | |
| BUILD_COMMIT: ${{ github.sha }} | |
| OUTPUT: ${{ matrix.output }} | |
| run: ${{ matrix.script }} | |
| - name: Build csmount (Linux FUSE) | |
| if: runner.os == 'Linux' | |
| run: go build -tags "all fuse" -o out/csmount ./cmd/csmount | |
| - name: Build classicstack (Windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| env: | |
| BUILD_VERSION: 0.0.0-pr.${{ github.run_number }} | |
| BUILD_COMMIT: ${{ github.sha }} | |
| OUTPUT: ${{ matrix.output }} | |
| run: ${{ matrix.script }} | |
| installer-windows: | |
| name: Build Windows Installer (ISCC) | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| submodules: recursive | |
| - name: Setup Go | |
| uses: actions/setup-go@v7 | |
| with: | |
| go-version-file: go.mod | |
| - name: Setup SPA | |
| uses: ./.github/actions/setup-spa | |
| - name: Install Inno Setup | |
| shell: pwsh | |
| run: | | |
| choco install innosetup --no-progress -y | |
| if (-not (Get-Command ISCC.exe -ErrorAction SilentlyContinue)) { | |
| throw "ISCC.exe not found on PATH after installing Inno Setup" | |
| } | |
| - name: Build installer (bin + ISCC) | |
| shell: pwsh | |
| run: pwsh packaging/windows/build.ps1 -Version 0.0.0-pr.${{ github.run_number }} | |
| - name: Upload installer artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: classicstack-windows-installer-pr${{ github.event.pull_request.number }} | |
| path: packaging/windows/Output/ClassicStack-Setup-*.exe | |
| if-no-files-found: error | |
| build-embedded: | |
| name: Build Embedded (TinyGo) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup Go | |
| uses: actions/setup-go@v7 | |
| with: | |
| go-version-file: go.mod | |
| - name: Setup TinyGo | |
| uses: acifani/setup-tinygo@v2 | |
| with: | |
| # 0.41.0 cannot assemble a goroot from a Go 1.26 stdlib — it fails with | |
| # "package internal/strconv is not in std", which 1.26 introduced. The | |
| # runner resolves to 1.26 despite go.mod pinning 1.25.13, so track 0.41.1 | |
| # (see refactor-harness.yml's TinyGo amd64 gates job, fixed there first). | |
| tinygo-version: "0.41.1" | |
| # Pico builds run before WT32-ETH01: WT32-ETH01 needs the full ESP-IDF SDK | |
| # (see below) and is not yet known-green, so it must not be able to abort | |
| # the job before the Pico targets — which build clean today — get a chance | |
| # to run. | |
| - name: Build Pico | |
| run: bash scripts/build_pico.sh pico | |
| - name: Build Pico W | |
| run: bash scripts/build_pico.sh picow | |
| - name: Build Pico 2 | |
| run: bash scripts/build_pico.sh pico2 | |
| - name: Build Pico 2 W | |
| run: bash scripts/build_pico.sh pico2w | |
| # hardware/esp32/wt32eth01 cgo's directly against ESP-IDF's C headers | |
| # (esp_eth.h, esp_wifi.h, ...) and links against its component libraries, | |
| # so the SDK has to be on disk before TinyGo can compile it. | |
| - name: Setup ESP-IDF | |
| uses: espressif/install-esp-idf-action@v1 | |
| with: | |
| version: "v5.3" | |
| continue-on-error: true | |
| # continue-on-error: the ESP-IDF headers alone are not sufficient yet -- | |
| # they #include a project-generated sdkconfig.h and expect the component | |
| # .a libraries (libesp_eth.a, libesp_wifi.a, ...), both of which only | |
| # exist after a real `idf.py build` of a matching component project. | |
| # scripts/build_wt32eth01.sh documents this gap; tracked as follow-up | |
| # work rather than blocking this job (or a release) on it. | |
| - name: Build WT32-ETH01 | |
| run: bash scripts/build_wt32eth01.sh | |
| continue-on-error: true | |