diff --git a/Makefile b/Makefile index ac88da1..e73f7db 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ PLATFORM_MAC_CATALYST = macOS,variant=Mac Catalyst PLATFORM_TVOS = tvOS Simulator,id=$(call udid_for,TV,tvOS-16) PLATFORM_WATCHOS = watchOS Simulator,id=$(call udid_for,Watch,watchOS-9) -default: test +default: swift-test build-all-platforms: for platform in \ @@ -22,18 +22,12 @@ build-all-platforms: -destination platform="$$platform" || exit 1; \ done; -test-swift: - swift test - swift test -c release - -build-for-static-stdlib: - @swift build -c debug --static-swift-stdlib - @swift build -c release --static-swift-stdlib - -test-integration: - xcrun xcodebuild test \ - -scheme "Integration" \ - -destination platform="$(PLATFORM_IOS)" || exit 1; \ +format: + swift format \ + --ignore-unparsable-files \ + --in-place \ + --recursive \ + ./Package.swift ./Sources ./Tests build-for-library-evolution: swift build \ @@ -42,26 +36,11 @@ build-for-library-evolution: -Xswiftc -emit-module-interface \ -Xswiftc -enable-library-evolution -build-for-static-stdlib-docker: - @docker run \ - -v "$(PWD):$(PWD)" \ - -w "$(PWD)" \ - swift:5.8-focal \ - bash -c "swift build -c debug --static-swift-stdlib" - @docker run \ - -v "$(PWD):$(PWD)" \ - -w "$(PWD)" \ - swift:5.8-focal \ - bash -c "swift build -c release --static-swift-stdlib" - -format: - swift format \ - --ignore-unparsable-files \ - --in-place \ - --recursive \ - ./Package.swift ./Sources ./Tests +test-swift: + swift test + swift test -c release -.PHONY: test test-swift build-for-library-evolution format +.PHONY: test-swift build-for-library-evolution format define udid_for $(shell xcrun simctl list --json devices available $(1) | jq -r '.devices | to_entries | map(select(.value | add)) | sort_by(.key) | .[] | select(.key | contains("$(2)")) | .value | last.udid')