diff --git a/.github/scripts/build.sh b/.github/scripts/build.sh new file mode 100755 index 000000000..76e65f49f --- /dev/null +++ b/.github/scripts/build.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -eo pipefail + +# build with SwiftPM: +# https://developer.apple.com/documentation/swift_packages/building_swift_packages_or_apps_that_use_them_in_continuous_integration_workflows + +xcodebuild -workspace Mastodon.xcworkspace \ + -scheme Mastodon \ + -disableAutomaticPackageResolution \ + -destination "platform=iOS Simulator,name=iPhone SE (2nd generation)" \ + clean \ + build | xcpretty \ No newline at end of file diff --git a/.github/scripts/setup.sh b/.github/scripts/setup.sh new file mode 100755 index 000000000..e1411fb50 --- /dev/null +++ b/.github/scripts/setup.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +sudo gem install cocoapods-keys +pod install \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..67670b46c --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,27 @@ +name: CI + +on: + push: + branches: + - master + - develop + - feature/* + pull_request: + branches: + - develop + +# macOS environments: https://github.com/actions/virtual-environments/tree/main/images/macos + +jobs: + build: + name: CI build + runs-on: macos-11.0 + steps: + - name: checkout + uses: actions/checkout@v2 + - name: force Xcode 12.2 + run: sudo xcode-select -switch /Applications/Xcode_12.2.app + - name: setup + run: exec ./.github/scripts/setup.sh + - name: build + run: exec ./.github/scripts/build.sh