Skip to content

Commit

Permalink
Install missing dependencies for publish jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
tgoyne committed Feb 13, 2024
1 parent da45778 commit 4a3d6a4
Show file tree
Hide file tree
Showing 5 changed files with 221 additions and 91 deletions.
71 changes: 31 additions & 40 deletions .github/workflows/master-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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: |
Expand All @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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' }}
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
84 changes: 33 additions & 51 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -41,51 +39,41 @@ 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
needs: [tag-release, prepare]
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
Expand All @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand All @@ -152,23 +137,20 @@ 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
needs: [test-installation, prepare]
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:
Expand Down
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.1.4
7 changes: 7 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source "https://rubygems.org"

gem 'cocoapods'
gem 'fileutils'
gem 'jazzy'
gem 'octokit'
gem 'pathname'
Loading

0 comments on commit 4a3d6a4

Please sign in to comment.