2
0

ci.yml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. name: CI
  2. on:
  3. push:
  4. branches: [main, master]
  5. pull_request:
  6. workflow_dispatch:
  7. permissions:
  8. contents: read
  9. env:
  10. GOPROXY: https://proxy.golang.org
  11. jobs:
  12. verify:
  13. name: Build, test, and verify FreeBSD ARM64 artifacts
  14. runs-on: ubuntu-latest
  15. steps:
  16. - name: Checkout
  17. uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
  18. with:
  19. fetch-depth: 0
  20. - name: Install Go
  21. uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
  22. with:
  23. go-version: '1.25.x'
  24. - name: Check formatting
  25. run: test -z "$(gofmt -l .)"
  26. - name: Run tests
  27. run: make test
  28. - name: Build native binary
  29. run: make build
  30. - name: Verify version output
  31. run: ./bin/pizzasql -version
  32. - name: Run compatibility suite
  33. env:
  34. PIZZASQL_COMPAT_STRICT: ${{ startsWith(github.ref, 'refs/tags/') && '1' || '0' }}
  35. run: make compat
  36. - name: Upload compatibility report
  37. uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
  38. with:
  39. name: pizzasql-compat-${{ github.sha }}
  40. path: compat-report.json
  41. retention-days: 14
  42. if-no-files-found: error
  43. - name: Cross-compile release targets
  44. run: |
  45. make build-linux-amd64
  46. make build-freebsd-amd64
  47. make build-freebsd-arm64
  48. - name: Stage artifacts and checksums
  49. run: |
  50. version="$(make -s version)"
  51. mkdir -p dist
  52. cp bin/pizzasql "dist/pizzasql-${version}-linux-amd64"
  53. cp bin/pizzasql-freebsd-amd64 "dist/pizzasql-${version}-freebsd-amd64"
  54. cp bin/pizzasql-freebsd-arm64 "dist/pizzasql-${version}-freebsd-arm64"
  55. (cd dist && sha256sum ./* > SHA256SUMS)
  56. cat dist/SHA256SUMS
  57. - name: Upload verification artifacts
  58. uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
  59. with:
  60. name: pizzasql-${{ github.sha }}
  61. path: dist/
  62. retention-days: 14
  63. if-no-files-found: error