Skip to content

Commit

Permalink
modify build-local to build for both android and iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
jsubloom committed Sep 1, 2023
1 parent 8f63195 commit dcb519a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 35 deletions.
13 changes: 0 additions & 13 deletions .github/workflows/build-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,6 @@ jobs:
run: yarn build
working-directory: packages/shared/

# This gave an answer of 135,210 bytes.
# That's pretty close? I'm expecting 138,443
- name: Print Yarn Lock Size
run: |
yarn_lock_size=$(stat -c %s yarn.lock)
echo "Size of yarn.lock: $yarn_lock_size bytes"
working-directory: packages/web/

- name: 2) [web] Install dependencies
# run: yarn --frozen-lockfile # TODO: --frozen-lockfile is erroring out, saying it must be updated. But it doesn't do that on my local machine. Why does it do that on the Github runner? Both seem to be using the same yarn version, 1.22.19
run: yarn
Expand All @@ -81,11 +73,6 @@ jobs:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}

- name: Print Folder Structure
run: |
echo "Folder structure:"
tree -L 5 --dirsfirst
# IF interested in trying local build: https://github.com/suiet/suiet/blob/63b50e4ba225b294af1018f3f98b9666738837c7/.github/workflows/build-app.yml#L9
- name: 3A) [mobile] EAS Cloud Build
run: eas build --platform ${{ github.event.inputs.platform }} --profile ${{ github.event.inputs.releaseStage }} --non-interactive --no-wait
Expand Down
52 changes: 30 additions & 22 deletions .github/workflows/build-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@ name: Local Build
on:
workflow_dispatch:
inputs:
platform:
type: choice
description: "Which mobile platforms to build"
required: true
default: "all"
options:
- android
- ios
- all
releaseStage:
type: choice
description: "type of release"
Expand All @@ -23,10 +14,17 @@ on:

jobs:
build-local-job:
name: Build application binaries locally
runs-on: ubuntu-latest
#runs-on: macos-latest

name: Build application binaries locally (${{ matrix.platform }})
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, macos-latest]
include:
- os: ubuntu-latest
platform: android
- os: macos-latest
platform: ios
steps:
- name: Check for EXPO_TOKEN
run: |
Expand Down Expand Up @@ -56,7 +54,7 @@ jobs:

# This gave an answer of 135,210 bytes.
# That's pretty close? I'm expecting 138,443
- name: Print Yarn Lock Size
- name: Debugging - Print Yarn Lock Size (Before)
run: |
yarn_lock_size=$(stat -c %s yarn.lock)
echo "Size of yarn.lock: $yarn_lock_size bytes"
Expand All @@ -67,6 +65,13 @@ jobs:
run: yarn
working-directory: packages/web/

- name: Debugging - Print Yarn Lock Size (After)
run: |
yarn_lock_size=$(stat -c %s yarn.lock)
echo "Size of yarn.lock: $yarn_lock_size bytes"
working-directory: packages/web/


- name: 2) [web] Build
run: yarn build
working-directory: packages/web/
Expand All @@ -82,21 +87,22 @@ jobs:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}

- name: Print Folder Structure
run: |
echo "Folder structure:"
tree -L 5 --dirsfirst
# Inspired by: https://github.com/suiet/suiet/blob/63b50e4ba225b294af1018f3f98b9666738837c7/.github/workflows/build-app.yml#L9
- name: 3A) [mobile] EAS Local Build
run: eas build --local --platform ${{ github.event.inputs.platform }} --profile ${{ github.event.inputs.releaseStage }} --non-interactive
run: eas build --local --platform ${{ matrix.platform }} --profile ${{ github.event.inputs.releaseStage }} --non-interactive
working-directory: packages/mobile/

- name: Print Folder Structure
run: |
echo "Folder structure:"
tree -L 4 --dirsfirst
# TODO: Upload artifact if successful
tree -L 3 --dirsfirst
- name: 📱 Upload binary
uses: actions/upload-artifact@v2
with:
name: app-${{ matrix.platform }}-${{ inputs.profile }}
path: packages/mobile/build-*

# - name: 3B) [electron] Install dependencies
# run: yarn --frozen-lockfile
# working-directory: ./packages/electron
Expand All @@ -108,3 +114,5 @@ jobs:
- name: 3B) [electron] Temporary Placeholder
run: echo "nothing to do"
working-directory: ./packages/electron
if: matrix.os == 'ubuntu-latest'

0 comments on commit dcb519a

Please sign in to comment.