Skip to content

Commit

Permalink
Use matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
luxaritas committed Jul 22, 2024
1 parent 1cee43b commit 46cde58
Showing 1 changed file with 14 additions and 39 deletions.
53 changes: 14 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
name: eternajs
path: ./eternajs/dist/prod

build-app:
build-wrapper:
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -86,43 +86,19 @@ jobs:
name: app
path: ./www

build-ios:
runs-on: macos-latest

needs: [build-eternajs, build-app]

steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v4
with:
name: app
path: ./www
- uses: actions/download-artifact@v4
with:
name: eternajs
path: ./www/eternajs
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Cache node modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-${{ hashFiles('./eternajs/package-lock.json') }}
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Build
run: npx cordova build ios --release --device
env:
NODE_ENV: prod
PARALLEL_BUILD: true
CORDOVA_PLATFORM: ios

build-android:
runs-on: ubuntu-latest
build-app:
needs: [build-eternajs, build-wrapper]

needs: [build-eternajs, build-app]
strategy:
fail-fast: false
matrix:
include:
- runner: "macos-latest"
target: "ios"
- platform: "ubuntu-latest"
target: android

runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v3
Expand All @@ -146,8 +122,7 @@ jobs:
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Build
run: npx cordova build android --release --device
run: npx cordova build ${{ matrix.target }} --release --device
env:
NODE_ENV: prod
PARALLEL_BUILD: true

0 comments on commit 46cde58

Please sign in to comment.