From 46cde586dae177a0b0220ddd32bcc0606156c7b7 Mon Sep 17 00:00:00 2001 From: Jonathan Romano Date: Mon, 22 Jul 2024 18:06:28 -0400 Subject: [PATCH] Use matrix --- .github/workflows/ci.yml | 53 +++++++++++----------------------------- 1 file changed, 14 insertions(+), 39 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eff2e31..53454c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,7 +54,7 @@ jobs: name: eternajs path: ./eternajs/dist/prod - build-app: + build-wrapper: runs-on: ubuntu-latest steps: @@ -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 @@ -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 -