diff --git a/.github/workflows/base.yml b/.github/workflows/base.yml new file mode 100644 index 0000000..13cd1ce --- /dev/null +++ b/.github/workflows/base.yml @@ -0,0 +1,63 @@ +name: Base + +on: + workflow_call: + inputs: + os: + description: 'The OS to run the job on' + required: true + type: string + xcode: + description: 'The Xcode version to run the job on' + required: true + type: string + device: + description: 'The device to run the job on' + required: true + type: string + +jobs: + + build_library: + runs-on: ${{ inputs.os }} + steps: + - uses: actions/checkout@v3 + - name: Select Xcode ${{ inputs.xcode }} + run: sudo xcode-select -s /Applications/Xcode_${{ inputs.xcode }}.app + - name: Run build + run: make build-library + - name: Run benchmark + run: make benchmark + + unit_test_library: + runs-on: ${{ inputs.os }} + steps: + - uses: actions/checkout@v3 + - name: Select Xcode ${{ inputs.xcode }} + run: sudo xcode-select -s /Applications/Xcode_${{ inputs.xcode }}.app + - name: Run tests + run: make test-library + + unit_test_example: + runs-on: ${{ inputs.os }} + steps: + - uses: actions/checkout@v3 + - name: Select Xcode ${{ inputs.xcode }} + run: sudo xcode-select -s /Applications/Xcode_${{ inputs.xcode }}.app + - name: Run tests + run: make test-example DEVICE='${{ inputs.device }}' + + lint_podspec: + runs-on: ${{ inputs.os }} + steps: + - uses: actions/checkout@v3 + - name: Select Xcode ${{ inputs.xcode }} + run: sudo xcode-select -s /Applications/Xcode_${{ inputs.xcode }}.app + - name: Install cocoapods + run: sudo gem install cocoapods + - name: Lint podspec + run: pod lib lint --allow-warnings --quick + + + + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2c0a46a..b7e02dd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,47 +8,24 @@ on: branches: - '*' -jobs: - - build_library: - strategy: - matrix: - xcode: - - '13.4.1' - - '14.1' - runs-on: macos-12 - steps: - - uses: actions/checkout@v3 - - name: Select Xcode ${{ matrix.xcode }} - run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app - - name: Run build - run: make build-library - - name: Run benchmark - run: make benchmark +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true - unit_test_library: +jobs: + ci: strategy: + fail-fast: false matrix: - xcode: - - '13.4.1' - - '14.1' - runs-on: macos-12 - steps: - - uses: actions/checkout@v3 - - name: Select Xcode ${{ matrix.xcode }} - run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app - - name: Run tests - run: make test-library - - unit_test_example: - runs-on: macos-12 - steps: - - uses: actions/checkout@v3 - - name: Selext Xcode ${{ matrix.xcode }} - run: sudo xcode-select -s /Applications/Xcode_14.1.app - - name: Run tests - run: make test-example - - - - + include: + - os: macos-13 + xcode: '15.0.1' + device: 'iPhone 15' + - os: macos-13 + xcode: '14.3.1' + device: 'iPhone 14' + uses: ./.github/workflows/base.yml + with: + os: ${{ matrix.os }} + xcode: ${{ matrix.xcode }} + device: ${{ matrix.device }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index e390514..7b311d9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ /.build /Packages /*.xcodeproj +/*.vscode xcuserdata/ DerivedData/ .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata diff --git a/Makefile b/Makefile index bf54336..29d8684 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ test-example: xcodebuild test \ -project Examples.xcodeproj \ -scheme Examples \ - -destination "platform=iOS Simulator,name=iPhone 13 Pro Max" + -destination "platform=iOS Simulator,name=$(DEVICE)" -derivedDataPath ../derivedData \ | xcpretty \ && rm -rf ../derivedData diff --git a/Package.resolved b/Package.resolved index 9c50246..0fc68e7 100644 --- a/Package.resolved +++ b/Package.resolved @@ -60,8 +60,8 @@ "repositoryURL": "https://github.com/pointfreeco/swift-custom-dump", "state": { "branch": null, - "revision": "0dd3e712ff2e557144dddced800c517c3102a069", - "version": "0.9.0" + "revision": "4a87bb75be70c983a9548597e8783236feb3401e", + "version": "0.11.1" } }, {