1.0.0-RC: hexagonal core/adapter/compose rewrite #30
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: | |
| tinygo-version: "0.41.0" | |
| - name: Build WT32-ETH01 | |
| run: bash scripts/build_wt32eth01.sh | |
| - 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 | |