-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: streamline actions into setup scripts
- Loading branch information
Showing
5 changed files
with
122 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: 'capacitor-setup-android' | ||
description: '' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
- name: Install JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
- name: Install Android SDK | ||
uses: android-actions/setup-android@v3 | ||
- name: Enable KVM | ||
run: | | ||
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | ||
sudo udevadm control --reload-rules | ||
sudo udevadm trigger --name-match=kvm | ||
- name: Cache node_modules | ||
id: node-modules | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
node_modules | ||
key: node-modules | ||
- name: Cache Gradle | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
android/.gradle | ||
~/.gradle/caches | ||
key: gradle | ||
- name: Cache Android SDK | ||
id: aandroid-sdk | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/Android/Sdk | ||
key: android-sdk | ||
- name: Cache AVD | ||
uses: actions/cache@v4 | ||
id: avd-cache | ||
with: | ||
path: | | ||
~/.android/avd/* | ||
~/.android/adb* | ||
key: avd-29 | ||
- name: Npm Install | ||
run: npm i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: 'capacitor-setup-ios' | ||
description: '' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
- name: Install Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.3' | ||
bundler-cache: true | ||
- name: Install Swift | ||
uses: SwiftyLab/setup-swift@latest | ||
with: | ||
swift-version: '5.10.0' | ||
- name: Cache node_modules | ||
id: node-modules | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
node_modules | ||
key: node-modules | ||
- name: Cache Pods | ||
id: pods | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
ios/Pods | ||
key: pods | ||
- name: Cache Xcode | ||
uses: irgaly/[email protected] | ||
with: | ||
key: xcode-deriveddata | ||
restore-keys: xcode-deriveddata | ||
- name: Npm Install | ||
shell: bash | ||
run: npm i | ||
- name: Pod Install | ||
shell: bash | ||
run: cd ios; pod install; cd - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: 'capacitor-setup-web' | ||
description: '' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
- name: Cache node_modules | ||
id: node-modules | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
node_modules | ||
key: node-modules | ||
- name: Npm Install | ||
run: npm i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,61 +9,16 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
- name: Cache node_modules | ||
id: node-modules | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
node_modules | ||
key: node-modules | ||
- name: Npm Install | ||
run: npm i | ||
- name: Setup Capacitor iOS | ||
uses: ./.github/actions/capacitor-setup-web | ||
- name: Run Build | ||
run: npm run verify:web | ||
build_ios: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
- name: Install Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.3' | ||
bundler-cache: true | ||
- name: Install Swift | ||
uses: SwiftyLab/setup-swift@latest | ||
with: | ||
swift-version: '5.10.0' | ||
- name: Cache node_modules | ||
id: node-modules | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
node_modules | ||
key: node-modules | ||
- name: Cache Pods | ||
id: pods | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
ios/Pods | ||
key: pods | ||
- name: Cache Xcode | ||
uses: irgaly/[email protected] | ||
with: | ||
key: xcode-deriveddata | ||
restore-keys: xcode-deriveddata | ||
- name: Npm Install | ||
run: npm i | ||
- name: Pod Install | ||
run: cd ios; pod install; cd - | ||
- name: Setup Capacitor iOS | ||
uses: ./.github/actions/capacitor-setup-ios | ||
- name: Run Build | ||
env: | ||
DEVELOPER_DIR: /Applications/Xcode_15.4.app | ||
|
@@ -78,38 +33,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
- name: Install JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
- name: Install Android SDK | ||
uses: android-actions/setup-android@v3 | ||
- name: Cache node_modules | ||
id: node-modules | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
node_modules | ||
key: node-modules | ||
- name: Cache Gradle | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
android/.gradle | ||
~/.gradle/caches | ||
key: gradle | ||
- name: Cache Android SDK | ||
id: aandroid-sdk | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/Android/Sdk | ||
key: android-sdk | ||
- name: Npm Install | ||
run: npm i | ||
- name: Setup Capacitor Android | ||
uses: ./.github/actions/capacitor-setup-android | ||
- name: Run Build | ||
run: npm run verify:android |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,42 +9,8 @@ jobs: | |
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
- name: Install Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.3' | ||
bundler-cache: true | ||
- name: Install Swift | ||
uses: SwiftyLab/setup-swift@latest | ||
with: | ||
swift-version: '5.10.0' | ||
- name: Cache node_modules | ||
id: node-modules | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
node_modules | ||
key: node-modules | ||
- name: Cache Pods | ||
id: pods | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
ios/Pods | ||
key: pods | ||
- name: Cache Xcode | ||
uses: irgaly/[email protected] | ||
with: | ||
key: xcode-deriveddata | ||
restore-keys: xcode-deriveddata | ||
- name: Npm Install | ||
run: npm i | ||
- name: Pod Install | ||
run: cd ios; pod install; cd - | ||
- name: Setup Capacitor iOS | ||
uses: ./.github/actions/capacitor-setup-ios | ||
- name: Run Tests | ||
env: | ||
DEVELOPER_DIR: /Applications/Xcode_15.4.app | ||
|
@@ -61,52 +27,8 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
- name: Install JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
- name: Install Android SDK | ||
uses: android-actions/setup-android@v3 | ||
- name: Enable KVM | ||
run: | | ||
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | ||
sudo udevadm control --reload-rules | ||
sudo udevadm trigger --name-match=kvm | ||
- name: Cache node_modules | ||
id: node-modules | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
node_modules | ||
key: node-modules | ||
- name: Cache Gradle | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
android/.gradle | ||
~/.gradle/caches | ||
key: gradle | ||
- name: Cache Android SDK | ||
id: aandroid-sdk | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/Android/Sdk | ||
key: android-sdk | ||
- name: Cache AVD | ||
uses: actions/cache@v4 | ||
id: avd-cache | ||
with: | ||
path: | | ||
~/.android/avd/* | ||
~/.android/adb* | ||
key: avd-29 | ||
- name: Npm Install | ||
run: npm i | ||
- name: Setup Capacitor Android | ||
uses: ./.github/actions/capacitor-setup-android | ||
- name: Run Tests | ||
uses: reactivecircus/android-emulator-runner@v2 | ||
with: | ||
|