diff --git a/.github/workflows/master-push.yml b/.github/workflows/master-push.yml index 5c97ffc6ec..7899351630 100644 --- a/.github/workflows/master-push.yml +++ b/.github/workflows/master-push.yml @@ -16,8 +16,7 @@ jobs: cleanup: # Clean-up XCode cloud workflows, before running the pipeline runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - name: Get Token id: token run: | @@ -41,8 +40,7 @@ jobs: echo "XCODE_VERSIONS_MATRIX=${{ env.XCODE_VERSION }}" >> $GITHUB_OUTPUT echo "PLATFORM_MATRIX=${{ env.PLATFORM }}" >> $GITHUB_OUTPUT echo "BUILD_PLATFORM_MATRIX=${{ env.BUILD_PLATFORM }}" >> $GITHUB_OUTPUT - - name: Checkout - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - name: Read SDK version id: get-version run: | @@ -53,14 +51,14 @@ jobs: name: Package docs needs: prepare steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install Jazzy - run: gem install jazzy -v ${{ env.JAZZY_VERSION }} # This is only used once, no need to cache this + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + bundler-cache: true - name: Select Xcode Version run: sudo xcode-select -switch /Applications/Xcode_${{ env.DOC_VERSION }}.app - name: Prepare docs for packaging - run: sh -x build.sh release-package-docs + run: bundle exec sh -x build.sh release-package-docs - name: Upload docs to artifacts library uses: actions/upload-artifact@v4 with: @@ -71,15 +69,14 @@ jobs: name: Package examples needs: prepare steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Prepare examples for packaging - run: sh -x build.sh release-package-examples - - name: Upload examples to artifacts library - uses: actions/upload-artifact@v4 - with: - path: realm-examples.zip - name: realm-examples + - uses: actions/checkout@v4 + - name: Prepare examples for packaging + run: sh -x build.sh release-package-examples + - name: Upload examples to artifacts library + uses: actions/upload-artifact@v4 + with: + path: realm-examples.zip + name: realm-examples build-product: # Creates framework for each platform, xcode version, target and configuration runs-on: macos-13 name: Package framework @@ -120,8 +117,7 @@ jobs: - platform: visionossimulator xcode-version: 15.1 steps: - - name: Checkout - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - name: Get Token id: token run: | @@ -196,8 +192,7 @@ jobs: - platform: visionos xcode-version: 15.1 steps: - - name: Checkout - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - name: Select Xcode Version run: sudo xcode-select -switch /Applications/Xcode_${{ matrix.xcode-version }}.app - name: Restore frameworks @@ -216,8 +211,7 @@ jobs: name: Package release file needs: [package-xcframework-platform, prepare] steps: - - name: Checkout - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - name: Select Xcode Version run: sudo xcode-select -switch /Applications/Xcode_${{ env.RELEASE_VERSION }}.app - name: Restore packages xcframeworks @@ -241,8 +235,7 @@ jobs: name: Test examples needs: [package-release, prepare] steps: - - name: Checkout - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - name: Select Xcode Version run: sudo xcode-select -switch /Applications/Xcode_${{ env.TEST_VERSION }}.app - name: Restore release @@ -256,8 +249,7 @@ jobs: name: Run tests on iOS with configuration Static needs: package-release steps: - - name: Checkout - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - name: Select Xcode Version run: sudo xcode-select -switch /Applications/Xcode_${{ env.TEST_VERSION }}.app - name: Test ios static @@ -267,8 +259,7 @@ jobs: name: Run tests on macOS needs: package-release steps: - - name: Checkout - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - name: Select Xcode Version run: sudo xcode-select -switch /Applications/Xcode_${{ env.TEST_VERSION }}.app - name: Test osx static @@ -297,12 +288,12 @@ jobs: installation: xcframework linkage: static steps: - - name: Checkout - uses: actions/checkout@v4 + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + bundler-cache: true - name: Select Xcode Version run: sudo xcode-select -switch /Applications/Xcode_${{ env.TEST_VERSION }}.app - - name: Install FileUtils - run: gem install fileutils - name: Restore release uses: actions/download-artifact@v4 if: ${{ matrix.installation == 'xcframework' }} @@ -317,7 +308,7 @@ jobs: run: | echo "REALM_TEST_BRANCH=${{ github.ref_name }}" >> $GITHUB_OUTPUT cd examples/installation - ./build.rb ${{ matrix.platform }} ${{ matrix.installation }} ${{ matrix.linkage }} + bundle exec ./build.rb ${{ matrix.platform }} ${{ matrix.installation }} ${{ matrix.linkage }} test-installation-xcframework: runs-on: macos-13 name: Run installation test for xcframework @@ -328,10 +319,10 @@ jobs: matrix: xcode-version: ${{ fromJSON(needs.prepare.outputs.XCODE_VERSIONS_MATRIX) }} steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install FileUtils - run: gem install fileutils + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + bundler-cache: true - name: Select Xcode Version run: sudo xcode-select -switch /Applications/Xcode_${{ matrix.xcode-version }}.app - name: Restore release @@ -346,5 +337,5 @@ jobs: run: | echo "REALM_TEST_BRANCH=${{ github.ref_name }}" >> $GITHUB_OUTPUT cd examples/installation - ./build.rb osx xcframework dynamic + bundle exec ./build.rb osx xcframework dynamic diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index cf549cdd7e..36961bff85 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -11,8 +11,7 @@ jobs: XCODE_VERSIONS_MATRIX: ${{ env.XCODE_VERSION }} VERSION: ${{ steps.get-version.outputs.VERSION }} steps: - - name: Checkout - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - name: Compute outputs run: | echo "XCODE_VERSIONS_MATRIX=${{ env.XCODE_VERSION }}" >> $GITHUB_OUTPUT @@ -26,8 +25,7 @@ jobs: name: Tag Release needs: prepare steps: - - name: Checkout - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - uses: rickstaa/action-create-tag@v1 id: "tag_create" with: @@ -41,35 +39,28 @@ jobs: env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Gem install - run: | - gem install octokit - gem install pathname - gem install fileutils - - name: Export GITHUB_TOKEN to workspace - run: echo "GITHUB_ACCESS_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + - run: brew install s3cmd - name: Publish docs - run: | - sh -x build.sh publish-docs ${{ github.sha }} + run: bundle exec sh -x build.sh publish-docs ${{ github.sha }} create-release: runs-on: macos-latest name: Create github release needs: [tag-release, prepare] + env: + GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Gem install - run: | - gem install octokit - gem install pathname - gem install fileutils - - name: Export GITHUB_TOKEN to workspace - run: echo "GITHUB_ACCESS_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + bundler-cache: true - name: Create Github release - run: ./build.sh publish-github ${{ github.sha }} + run: bundle exec ./build.sh publish-github ${{ github.sha }} publish-cocoapods: runs-on: macos-latest name: Publish Cocoapods specs @@ -77,15 +68,12 @@ jobs: env: COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install ruby - uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1 + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 with: - ruby-version: '3.1.2' bundler-cache: true - name: Publish - run: ./build.sh publish-cocoapods v${{ needs.prepare.outputs.VERSION }} + run: bundle exec ./build.sh publish-cocoapods v${{ needs.prepare.outputs.VERSION }} update-checker: runs-on: macos-latest name: Update to latest version update checker file @@ -94,15 +82,12 @@ jobs: AWS_ACCESS_KEY_ID: ${{ secrets.UPDATE_CHECKER_ACCESS_KEY }} AWS_SECRET_ACCESS_KEY: ${{ secrets.UPDATE_CHECKER_SECRET_KEY }} steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install ruby - uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1 + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 with: - ruby-version: '3.1.2' bundler-cache: true - - name: Create Github release - run: ./build.sh publish-update-checker + - run: brew install s3cmd + - run: bundle exec ./build.sh publish-update-checker test-installation: runs-on: macos-13 name: Run installation test for ${{ matrix.platform }}, ${{ matrix.installation }} and ${{ matrix.linkage }} @@ -140,10 +125,10 @@ jobs: - platform: visionos installation: cocoapods steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install FileUtils - run: gem install fileutils + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + bundler-cache: true - uses: maxim-lobanov/setup-xcode@v1 with: xcode-version: ${{ env.TEST_XCODE_VERSION }} @@ -152,7 +137,7 @@ jobs: - name: Run installation test run: | cd examples/installation - ./build.rb ${{ matrix.platform }} ${{ matrix.installation }} ${{ matrix.linkage }} + bundle exec ./build.rb ${{ matrix.platform }} ${{ matrix.installation }} ${{ matrix.linkage }} post-slack-release: runs-on: macos-latest name: Publish to release Slack channel @@ -160,15 +145,12 @@ jobs: env: WEBHOOK_URL: ${{ secrets.SLACK_RELEASES_WEBHOOK }} steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Gem install - run: | - gem install octokit - gem install pathname - gem install fileutils + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + bundler-cache: true - name: Prepare Changelog - run: ./build.sh prepare-publish-changelog + run: bundle exec ./build.sh prepare-publish-changelog - name: 'Post to #realm-releases' uses: realm/ci-actions/release-to-slack@v3 with: diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000000..0aec50e6ed --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.1.4 diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000000..46479e192a --- /dev/null +++ b/Gemfile @@ -0,0 +1,7 @@ +source "https://rubygems.org" + +gem 'cocoapods' +gem 'fileutils' +gem 'jazzy' +gem 'octokit' +gem 'pathname' diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000000..7680647e13 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,149 @@ +GEM + remote: https://rubygems.org/ + specs: + CFPropertyList (3.0.6) + rexml + activesupport (7.1.3) + base64 + bigdecimal + concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + minitest (>= 5.1) + mutex_m + tzinfo (~> 2.0) + addressable (2.8.6) + public_suffix (>= 2.0.2, < 6.0) + algoliasearch (1.27.5) + httpclient (~> 2.8, >= 2.8.3) + json (>= 1.5.1) + atomos (0.1.3) + base64 (0.2.0) + bigdecimal (3.1.6) + claide (1.1.0) + cocoapods (1.15.2) + addressable (~> 2.8) + claide (>= 1.0.2, < 2.0) + cocoapods-core (= 1.15.2) + cocoapods-deintegrate (>= 1.0.3, < 2.0) + cocoapods-downloader (>= 2.1, < 3.0) + cocoapods-plugins (>= 1.0.0, < 2.0) + cocoapods-search (>= 1.0.0, < 2.0) + cocoapods-trunk (>= 1.6.0, < 2.0) + cocoapods-try (>= 1.1.0, < 2.0) + colored2 (~> 3.1) + escape (~> 0.0.4) + fourflusher (>= 2.3.0, < 3.0) + gh_inspector (~> 1.0) + molinillo (~> 0.8.0) + nap (~> 1.0) + ruby-macho (>= 2.3.0, < 3.0) + xcodeproj (>= 1.23.0, < 2.0) + cocoapods-core (1.15.2) + activesupport (>= 5.0, < 8) + addressable (~> 2.8) + algoliasearch (~> 1.0) + concurrent-ruby (~> 1.1) + fuzzy_match (~> 2.0.4) + nap (~> 1.0) + netrc (~> 0.11) + public_suffix (~> 4.0) + typhoeus (~> 1.0) + cocoapods-deintegrate (1.0.5) + cocoapods-downloader (2.1) + cocoapods-plugins (1.0.0) + nap + cocoapods-search (1.0.1) + cocoapods-trunk (1.6.0) + nap (>= 0.8, < 2.0) + netrc (~> 0.11) + cocoapods-try (1.2.0) + colored2 (3.1.2) + concurrent-ruby (1.2.3) + connection_pool (2.4.1) + drb (2.2.0) + ruby2_keywords + escape (0.0.4) + ethon (0.16.0) + ffi (>= 1.15.0) + faraday (2.9.0) + faraday-net_http (>= 2.0, < 3.2) + faraday-net_http (3.1.0) + net-http + ffi (1.16.3) + fileutils (1.7.2) + fourflusher (2.3.1) + fuzzy_match (2.0.4) + gh_inspector (1.1.3) + httpclient (2.8.3) + i18n (1.14.1) + concurrent-ruby (~> 1.0) + jazzy (0.14.4) + cocoapods (~> 1.5) + mustache (~> 1.1) + open4 (~> 1.3) + redcarpet (~> 3.4) + rexml (~> 3.2) + rouge (>= 2.0.6, < 5.0) + sassc (~> 2.1) + sqlite3 (~> 1.3) + xcinvoke (~> 0.3.0) + json (2.7.1) + liferaft (0.0.6) + minitest (5.22.2) + molinillo (0.8.0) + mustache (1.1.1) + mutex_m (0.2.0) + nanaimo (0.3.0) + nap (1.1.0) + net-http (0.4.1) + uri + netrc (0.11.0) + octokit (8.1.0) + base64 + faraday (>= 1, < 3) + sawyer (~> 0.9) + open4 (1.3.4) + pathname (0.2.0) + public_suffix (4.0.7) + redcarpet (3.6.0) + rexml (3.2.6) + rouge (4.2.0) + ruby-macho (2.5.1) + ruby2_keywords (0.0.5) + sassc (2.4.0) + ffi (~> 1.9) + sawyer (0.9.2) + addressable (>= 2.3.5) + faraday (>= 0.17.3, < 3) + sqlite3 (1.7.2-arm64-darwin) + sqlite3 (1.7.2-x86_64-darwin) + typhoeus (1.4.1) + ethon (>= 0.9.0) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + uri (0.13.0) + xcinvoke (0.3.0) + liferaft (~> 0.0.6) + xcodeproj (1.24.0) + CFPropertyList (>= 2.3.3, < 4.0) + atomos (~> 0.1.3) + claide (>= 1.0.2, < 2.0) + colored2 (~> 3.1) + nanaimo (~> 0.3.0) + rexml (~> 3.2.4) + +PLATFORMS + arm64-darwin-23 + x86_64-darwin-20 + +DEPENDENCIES + cocoapods + fileutils + jazzy + octokit + pathname + +BUNDLED WITH + 2.3.26