|
55 | 55 | # - language: c-cpp |
56 | 56 | # build-mode: autobuild |
57 | 57 | - language: go |
58 | | - build-mode: autobuild |
| 58 | + build-mode: manual |
59 | 59 | - language: java-kotlin |
60 | 60 | build-mode: autobuild |
61 | 61 | - language: javascript-typescript |
|
76 | 76 | - name: Checkout repository |
77 | 77 | uses: actions/checkout@v6 |
78 | 78 |
|
| 79 | + - name: Set up Go |
| 80 | + if: matrix.language == 'go' |
| 81 | + uses: actions/setup-go@v6 |
| 82 | + with: |
| 83 | + go-version-file: 'sdks/go.mod' |
| 84 | + |
79 | 85 | # Add any setup steps before running the `github/codeql-action/init` action. |
80 | 86 | # This includes steps like installing compilers or runtimes (`actions/setup-node` |
81 | 87 | # or others). This is typically only required for manual builds. |
@@ -105,12 +111,22 @@ jobs: |
105 | 111 | if: matrix.build-mode == 'manual' |
106 | 112 | shell: bash |
107 | 113 | run: | |
108 | | - echo 'If you are using a "manual" build mode for one or more of the' \ |
109 | | - 'languages you are analyzing, replace this with the commands to build' \ |
110 | | - 'your code, for example:' |
111 | | - echo ' make bootstrap' |
112 | | - echo ' make release' |
113 | | - exit 1 |
| 114 | + if [ "${{ matrix.language }}" = "go" ]; then |
| 115 | + echo "Building sdks module..." |
| 116 | + (cd sdks && go build ./...) |
| 117 | +
|
| 118 | + echo "Building playground/backend module..." |
| 119 | + (cd playground/backend && go build ./...) |
| 120 | +
|
| 121 | + echo "Building learning/katas/go module..." |
| 122 | + (cd learning/katas/go && go mod tidy && go build ./...) |
| 123 | +
|
| 124 | + echo "Building learning/tour-of-beam/backend module..." |
| 125 | + (cd learning/tour-of-beam/backend && go build ./cmd/... ./internal/... ./playground_api/...) |
| 126 | + else |
| 127 | + echo "No manual build steps defined for ${{ matrix.language }}" |
| 128 | + exit 1 |
| 129 | + fi |
114 | 130 |
|
115 | 131 | - name: Perform CodeQL Analysis |
116 | 132 | uses: github/codeql-action/analyze@v4 |
|
0 commit comments