Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Minor job improvements #541

Merged
merged 3 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 1 addition & 67 deletions .github/workflows/ci-tests-xcode-swift-6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,16 +136,6 @@ jobs:
./Derived/*
key: ${{ github.run_id }}-dependencies
fail-on-cache-miss: true
# Caching for apollo-ios and apollo-ios-codegen SPM dependencies
# - uses: actions/cache@v3
# with:
# path: ./DerivedData/SourcePackages
# key: ${{ runner.os }}-spm-${{ hashFiles('./apollo-ios/Package.resolved') }}-${{ hashFiles('./apollo-ios-codegen/Package.resolved') }}
# - name: Run Tuist Generation
# uses: tuist/[email protected]
# with:
# command: 'generate'
# arguments: ''
- name: Build and Test
if: ${{ matrix.should-run == true || matrix.should-run == 'true' }}
id: build-and-test
Expand Down Expand Up @@ -188,60 +178,4 @@ jobs:
path: |
TestResults/ResultBundle.zip

# CodegenTestConfigurations removed because source is not compatible with Sendable yet.

verify-frontend-bundle-latest:
runs-on: macos-15
needs: [changes]
if: ${{ needs.changes.outputs.codegen == 'true' }}
timeout-minutes: 5
name: Verify Frontend Bundle Latest - macOS
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Build JS Bundle
shell: bash
working-directory: apollo-ios-codegen/Sources/GraphQLCompiler/JavaScript
run: npm install && ./auto_rollup.sh
- name: Verify Latest
shell: bash
run: |
git diff --exit-code

verify-cli-binary-archive:
runs-on: macos-15
needs: [changes]
if: ${{ needs.changes.outputs.codegen == 'true' }}
timeout-minutes: 5
name: Verify CLI Binary Archive - macOS
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Extract CLI Binary
shell: bash
working-directory: apollo-ios/CLI
run: tar -xf apollo-ios-cli.tar.gz apollo-ios-cli
- name: Verify Version
shell: bash
working-directory: apollo-ios/scripts
run: ./cli-version-check.sh

run-cocoapods-integration-tests:
runs-on: macos-15
timeout-minutes: 20
name: Cocoapods Integration Tests - macOS
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ env.XCODE_VERSION }}
- name: Checkout Repo
uses: actions/checkout@v3
- name: Export ENV Variables
shell: bash
working-directory: apollo-ios
run: |
apollo_ios_sha=$(git rev-parse HEAD)
echo "APOLLO_IOS_SHA=$apollo_ios_sha" >> ${GITHUB_ENV}
- name: Run CocoaPods Integration Tests
id: run-cocoapods-integration-tests
uses: ./.github/actions/run-cocoapods-integration-tests
# CodegenTestConfigurations removed because source is not compatible with Sendable yet.
2 changes: 1 addition & 1 deletion .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ jobs:
- name: Build JS Bundle
shell: bash
working-directory: apollo-ios-codegen/Sources/GraphQLCompiler/JavaScript
run: npm install && ./auto_rollup.sh
run: ./auto_rollup.sh
- name: Verify Latest
shell: bash
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
output_file="$SCRIPT_DIR/../ApolloCodegenFrontendBundle.swift"
cd "$SCRIPT_DIR" && npm run build
cd "$SCRIPT_DIR" && npm install && npm run build
minJS=$(cat "$SCRIPT_DIR/dist/ApolloCodegenFrontend.bundle.js")
printf "%s%s%s" "let ApolloCodegenFrontendBundle: String = #\"" "$minJS" "\"#" > "$output_file"
exit 0
Loading