diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 5034d2b0..770f49e0 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -40,7 +40,10 @@ jobs: - name: Build working-directory: ShadowsocksX-NG2 - run: task build DERIVED_DATA_DIR="$(mktemp -d "${RUNNER_TEMP}/codeql-derived-data.XXXXXX")" + run: >- + task build + BUILD_DESTINATION=generic/platform=macOS + DERIVED_DATA_DIR="$(mktemp -d "${RUNNER_TEMP}/codeql-derived-data.XXXXXX")" - name: Analyze uses: github/codeql-action/analyze@5895b2c9be147bc7f1c75ce72c5cb577febb1907 # v4 diff --git a/ShadowsocksX-NG2/Taskfile.dist.yml b/ShadowsocksX-NG2/Taskfile.dist.yml index ec63fae5..d6cd4cb3 100644 --- a/ShadowsocksX-NG2/Taskfile.dist.yml +++ b/ShadowsocksX-NG2/Taskfile.dist.yml @@ -121,6 +121,8 @@ tasks: build: desc: Build the ShadowsocksX-NG2 macOS application with Debug Config + vars: + BUILD_DESTINATION: '{{default "platform=macOS,arch=arm64" .BUILD_DESTINATION}}' deps: - gen:prj cmds: @@ -129,7 +131,7 @@ tasks: -project ShadowsocksX-NG2.xcodeproj -scheme ShadowsocksX-NG2 -configuration Debug - -destination 'platform=macOS,arch=arm64' + -destination {{.BUILD_DESTINATION | shellQuote}} -derivedDataPath {{.DERIVED_DATA_DIR | shellQuote}} {{if .RESULT_BUNDLE_PATH}}-resultBundlePath {{.RESULT_BUNDLE_PATH | shellQuote}}{{end}} SWIFT_SUPPRESS_WARNINGS=NO SWIFT_TREAT_WARNINGS_AS_ERRORS=YES GCC_TREAT_WARNINGS_AS_ERRORS=YES