Skip to content

Commit

Permalink
Merge pull request #8483 from LedgerHQ/support/no-more-setup-toolchai…
Browse files Browse the repository at this point in the history
…n-gh-runners-batch-2

No more setup toolchain (Github runners) batch 2
  • Loading branch information
angusbayley authored Nov 26, 2024
2 parents e04e175 + 299613a commit f404cb1
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 47 deletions.
20 changes: 4 additions & 16 deletions .github/workflows/build-desktop-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,27 +54,15 @@ jobs:
- name: Setup git user
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-git-user@develop

- name: Setup the toolchain
id: toolchain
if: ${{ matrix.config.name != 'linux' }}
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-toolchain@develop
with:
accountId: ${{ secrets.AWS_ACCOUNT_ID_PROD }}
roleName: ${{ secrets.AWS_CACHE_ROLE_NAME }}
region: ${{ secrets.AWS_CACHE_REGION }}
install-dotnet: ${{ matrix.config.dotnet }}
skip-turbo-cache: "false"
turbo-server-token: ${{ secrets.TURBOREPO_SERVER_TOKEN }}

- name: Setup the caches
id: caches
if: ${{ matrix.config.name == 'linux' }}
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-caches@develop
id: setup-caches
with:
install-proto: ${{ matrix.config.name == 'mac' }}
skip-turbo-cache: "false"
accountId: ${{ secrets.AWS_ACCOUNT_ID_PROD }}
roleName: ${{ secrets.AWS_CACHE_ROLE_NAME }}
region: ${{ secrets.AWS_CACHE_REGION }}
skip-turbo-cache: "false"
turbo-server-token: ${{ secrets.TURBOREPO_SERVER_TOKEN }}

- name: Build desktop
Expand All @@ -85,7 +73,7 @@ jobs:

- name: Build the app
id: build-app
run: pnpm build:lld --api="http://127.0.0.1:${{ matrix.config.os == 'linux' && steps.caches.outputs.port || steps.toolchain.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo"
run: pnpm build:lld --api="http://127.0.0.1:${{ steps.setup-caches.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo"
env:
GENERATE_METAFILES: 1

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-mobile-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ jobs:
ref: ${{ inputs.ref || github.sha }}
- name: Setup git user
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-git-user@develop
- name: Setup the toolchain
- name: Setup the caches
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-caches@develop
id: caches
id: setup-caches
with:
accountId: ${{ secrets.AWS_ACCOUNT_ID_PROD }}
roleName: ${{ secrets.AWS_CACHE_ROLE_NAME }}
Expand All @@ -111,7 +111,7 @@ jobs:
new_command_on_retry: rm -rf ~/.cocoapods/ && pnpm clean && pnpm i --filter="live-mobile..." --filter="ledger-live" --no-frozen-lockfile --unsafe-perm
- name: bundle ios and android js
run: |
pnpm build:llm:deps --api="http://127.0.0.1:${{ steps.caches.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo"
pnpm build:llm:deps --api="http://127.0.0.1:${{ steps.setup-caches.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo"
pnpm mobile bundle:ios:prod
pnpm mobile bundle:android:prod
pnpm mobile gen-metafile
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/test-cli-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,27 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.sha }}
- name: Setup the toolchain
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-toolchain@develop
id: toolchain
- name: Setup the caches
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-caches@develop
id: setup-caches
with:
install-proto: true
skip-turbo-cache: "false"
accountId: ${{ secrets.AWS_ACCOUNT_ID_PROD }}
roleName: ${{ secrets.AWS_CACHE_ROLE_NAME }}
region: ${{ secrets.AWS_CACHE_REGION }}
turbo-server-token: ${{ secrets.TURBOREPO_SERVER_TOKEN }}
skip-turbo-cache: "false"
- name: Install dependencies
run: pnpm i -F "live-cli*..." -F "ledger-live"
- name: build cli
run: pnpm build:cli --api="http://127.0.0.1:${{ steps.toolchain.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo"
run: pnpm build:cli --api="http://127.0.0.1:${{ steps.setup-caches.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo"
- name: lint cli
run: pnpm lint --filter="@ledgerhq/live-cli" --api="http://127.0.0.1:${{ steps.toolchain.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo" -- --quiet
run: pnpm lint --filter="@ledgerhq/live-cli" --api="http://127.0.0.1:${{ steps.setup-caches.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo" -- --quiet
- name: typecheck cli
run: pnpm typecheck --filter="@ledgerhq/live-cli" --api="http://127.0.0.1:${{ steps.toolchain.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo"
run: pnpm typecheck --filter="@ledgerhq/live-cli" --api="http://127.0.0.1:${{ steps.setup-caches.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo"
- name: test cli
id: test
run: pnpm run test --filter="@ledgerhq/live-cli" --api="http://127.0.0.1:${{ steps.toolchain.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo"
run: pnpm run test --filter="@ledgerhq/live-cli" --api="http://127.0.0.1:${{ steps.setup-caches.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo"
- name: get diff
id: diff
run: |
Expand Down
21 changes: 11 additions & 10 deletions .github/workflows/test-desktop-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.sha }}
- name: Setup the toolchain
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-toolchain@develop
id: toolchain
- name: Setup the caches
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-caches@develop
id: setup-caches
with:
install-dotnet: true
install-proto: true
skip-turbo-cache: "false"
accountId: ${{ secrets.AWS_ACCOUNT_ID_PROD }}
roleName: ${{ secrets.AWS_CACHE_ROLE_NAME }}
Expand All @@ -54,9 +54,9 @@ jobs:
id: setup-test-desktop
with:
skip_builds: true
turborepo-server-port: ${{ steps.toolchain.outputs.port }}
turborepo-server-port: ${{ steps.setup-caches.outputs.port }}
- name: lint
run: pnpm desktop lint:ci -p ${{ steps.toolchain.outputs.port }} -t "${{ secrets.TURBOREPO_SERVER_TOKEN }}"
run: pnpm desktop lint:ci -p ${{ steps.setup-caches.outputs.port }} -t "${{ secrets.TURBOREPO_SERVER_TOKEN }}"
- name: prettier
run: pnpm desktop prettier:check
- name: typecheck
Expand All @@ -82,10 +82,11 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.sha }}
- name: Setup the toolchain
id: toolchain
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-toolchain@develop
- name: Setup the caches
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-caches@develop
id: setup-caches
with:
install-proto: true
skip-turbo-cache: "false"
accountId: ${{ secrets.AWS_ACCOUNT_ID_PROD }}
roleName: ${{ secrets.AWS_CACHE_ROLE_NAME }}
Expand All @@ -95,7 +96,7 @@ jobs:
id: setup-test-desktop
with:
skip_builds: true
turborepo-server-port: ${{ steps.toolchain.outputs.port }}
turborepo-server-port: ${{ steps.setup-caches.outputs.port }}
- name: Run unit tests
run: pnpm desktop test:jest:coverage

Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/test-mobile-e2e-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,11 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.sha }}
- name: Setup the toolchain
id: toolchain
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-toolchain@develop
- name: Setup the caches
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-caches@develop
id: setup-caches
with:
install-proto: true
skip-turbo-cache: "false"
accountId: ${{ secrets.AWS_ACCOUNT_ID_PROD }}
roleName: ${{ secrets.AWS_CACHE_ROLE_NAME }}
Expand Down Expand Up @@ -237,10 +238,10 @@ jobs:
pnpm i --filter="live-mobile..." --filter="ledger-live" --filter="@ledgerhq/dummy-*-app..." --no-frozen-lockfile --unsafe-perm
- name: Build dependencies
run: |
pnpm build:llm:deps --api="http://127.0.0.1:${{ steps.toolchain.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo"
pnpm build:llm:deps --api="http://127.0.0.1:${{ steps.setup-caches.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo"
- name: Build Dummy Live SDK and Dummy Wallet API apps for testing
run: |
pnpm build:dummy-apps --api="http://127.0.0.1:${{ steps.toolchain.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo"
pnpm build:dummy-apps --api="http://127.0.0.1:${{ steps.setup-caches.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo"
shell: bash
- name: Build Android app for Detox test run
run: |
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/test-mobile-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.sha }}
- name: Setup the toolchain
id: toolchain
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-toolchain@develop
- name: Setup the caches
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-caches@develop
id: setup-caches
with:
install-proto: true
skip-turbo-cache: "false"
accountId: ${{ secrets.AWS_ACCOUNT_ID_PROD }}
roleName: ${{ secrets.AWS_CACHE_ROLE_NAME }}
Expand All @@ -51,12 +52,12 @@ jobs:
- name: Install dependencies
run: pnpm i --filter="live-mobile..." --filter="ledger-live" --no-frozen-lockfile --unsafe-perm
- name: Run linter
run: pnpm lint --filter="live-mobile" --api="http://127.0.0.1:${{ steps.toolchain.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo" -- --format="json" -o="lint-mobile.json"
run: pnpm lint --filter="live-mobile" --api="http://127.0.0.1:${{ steps.setup-caches.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo" -- --format="json" -o="lint-mobile.json"
- name: check for dead code
run: pnpm mobile knip-check
shell: bash
- name: Run code checkers
run: pnpm typecheck --filter="live-mobile" --api="http://127.0.0.1:${{ steps.toolchain.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo"
run: pnpm typecheck --filter="live-mobile" --api="http://127.0.0.1:${{ steps.setup-caches.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo"
- name: Run unit tests
run: pnpm mobile test
- uses: actions/upload-artifact@v4
Expand Down

0 comments on commit f404cb1

Please sign in to comment.