mirror of
https://github.com/shadowsocks/ShadowsocksX-NG.git
synced 2026-11-14 10:13:54 +00:00
100 lines
2.5 KiB
YAML
100 lines
2.5 KiB
YAML
# https://taskfile.dev/
|
|
version: '3'
|
|
|
|
vars:
|
|
PROJECT_NAME: "ShadowsocksX-NG2"
|
|
BUILD_DIR: "{{ .TASKFILE_DIR }}/.build"
|
|
DERIVED_DATA_DIR: "{{ .BUILD_DIR }}/derivedData"
|
|
|
|
tasks:
|
|
gen:prj:
|
|
desc: 'Generate xcode project by xcodegen'
|
|
cmds:
|
|
- xcodegen generate
|
|
|
|
build:
|
|
desc: Build the ShadowsocksX-NG2 macOS application with Debug Config
|
|
deps:
|
|
- gen:prj
|
|
cmds:
|
|
- >-
|
|
xcodebuild
|
|
-project ShadowsocksX-NG2.xcodeproj
|
|
-scheme ShadowsocksX-NG2
|
|
-configuration Debug
|
|
-destination 'platform=macOS,arch=arm64'
|
|
-derivedDataPath {{ .DERIVED_DATA_DIR }}
|
|
build
|
|
|
|
build:release:
|
|
desc: Build the ShadowsocksX-NG2 macOS application with Release Config
|
|
deps:
|
|
- gen:prj
|
|
cmds:
|
|
- >-
|
|
xcodebuild
|
|
-project ShadowsocksX-NG2.xcodeproj
|
|
-scheme ShadowsocksX-NG2
|
|
-configuration Release
|
|
-destination 'platform=macOS,arch=arm64'
|
|
-derivedDataPath {{ .DERIVED_DATA_DIR }}
|
|
build
|
|
|
|
format:
|
|
desc: 'Format the code by swift-format'
|
|
cmds:
|
|
- swift format format --in-place -r App Tests Domain Agent
|
|
|
|
lint:
|
|
desc: 'Lint the swift code by swiftlint'
|
|
cmds:
|
|
- swiftlint lint --config .swiftlint.yml --no-cache
|
|
|
|
lint:fix:
|
|
desc: 'Automatically fix SwiftLint violations'
|
|
cmds:
|
|
- swiftlint lint --fix --config .swiftlint.yml --no-cache
|
|
|
|
test:
|
|
desc: 'Run conversion and unit tests'
|
|
deps:
|
|
- gen:prj
|
|
cmds:
|
|
- task: test:binaries
|
|
- task: test:rules
|
|
- >-
|
|
xcodebuild
|
|
-project ShadowsocksX-NG2.xcodeproj
|
|
-scheme ShadowsocksX-NG2
|
|
-destination 'platform=macOS,arch=arm64'
|
|
-derivedDataPath {{ .DERIVED_DATA_DIR }}
|
|
test
|
|
|
|
test:binaries:
|
|
desc: 'Verify pinned external binary downloads with local assets'
|
|
cmds:
|
|
- PYTHONDONTWRITEBYTECODE=1 python3 Scripts/test-external-binary-fetch.py
|
|
|
|
test:rules:
|
|
desc: 'Run offline rule conversion and generated fixture checks'
|
|
cmds:
|
|
- PYTHONDONTWRITEBYTECODE=1 python3 Scripts/test-rule-snapshot-converters.py
|
|
- PYTHONDONTWRITEBYTECODE=1 python3 Scripts/test-rule-conversion-behavior.py
|
|
|
|
test:smoke:
|
|
desc: 'Run real-process smoke tests (real sslocal; release gate)'
|
|
deps:
|
|
- gen:prj
|
|
cmds:
|
|
- >-
|
|
xcodebuild
|
|
-project ShadowsocksX-NG2.xcodeproj
|
|
-scheme ShadowsocksX-NG2Smoke
|
|
-destination 'platform=macOS,arch=arm64'
|
|
-derivedDataPath {{ .DERIVED_DATA_DIR }}
|
|
test
|
|
|
|
clean:
|
|
cmds:
|
|
- rm -rf {{ .BUILD_DIR }}
|