From 47cea5414b62c62a58721c140654650792f08c81 Mon Sep 17 00:00:00 2001 From: Shahzad Afridi Date: Thu, 29 Aug 2024 19:54:57 +0500 Subject: [PATCH] Deleted individual workflows --- .github/workflows/artifact-links.yml | 22 -- .github/workflows/build-android.yml | 43 ---- .github/workflows/build-desktop.yml | 39 --- .github/workflows/build-ios.yml | 41 ---- .github/workflows/build-macos.yml | 34 --- .github/workflows/build-web.yml | 39 --- .github/workflows/main.yml | 342 +++++++++++++-------------- 7 files changed, 171 insertions(+), 389 deletions(-) delete mode 100644 .github/workflows/artifact-links.yml delete mode 100644 .github/workflows/build-android.yml delete mode 100644 .github/workflows/build-desktop.yml delete mode 100644 .github/workflows/build-ios.yml delete mode 100644 .github/workflows/build-macos.yml delete mode 100644 .github/workflows/build-web.yml diff --git a/.github/workflows/artifact-links.yml b/.github/workflows/artifact-links.yml deleted file mode 100644 index bc0f892..0000000 --- a/.github/workflows/artifact-links.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Generate Artifact Links - -on: - workflow_run: - workflows: ["Build Android", "Build iOS", "Build Desktop", "Build macOS", "Build Web"] - types: - - completed - -jobs: - generate-artifact-links: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: List artifacts - run: | - echo "Artifact URLs for download:" - echo "Android APK: ${{ needs.build-android.outputs.artifact-url }}" - echo "iOS Framework: ${{ needs.build-ios.outputs.artifact-url }}" - echo "Desktop JAR: ${{ needs.build-desktop.outputs.artifact-url }}" - echo "Web App: ${{ needs.build-web.outputs.artifact-url }}" diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml deleted file mode 100644 index 34744c6..0000000 --- a/.github/workflows/build-android.yml +++ /dev/null @@ -1,43 +0,0 @@ - -name: Build Android - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - build-android: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up JDK - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'zulu' - - - name: Cache Gradle packages - uses: actions/cache@v4 - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} - restore-keys: | - ${{ runner.os }}-gradle- - - - name: Build Android - run: ./gradlew assembleRelease --info - - - name: Run Unit Tests - run: ./gradlew test - - - name: Upload Android artifacts - uses: actions/upload-artifact@v4 - with: - name: android-release-apk - path: composeApp/build/outputs/apk/release/*.apk diff --git a/.github/workflows/build-desktop.yml b/.github/workflows/build-desktop.yml deleted file mode 100644 index a951f2d..0000000 --- a/.github/workflows/build-desktop.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Build Desktop - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - build-desktop: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up JDK - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'zulu' - - - name: Cache Gradle packages - uses: actions/cache@v4 - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} - restore-keys: | - ${{ runner.os }}-gradle- - - - name: Build Desktop - run: ./gradlew desktopJar - - - name: Upload Desktop artifacts - uses: actions/upload-artifact@v4 - with: - name: desktop-jar - path: composeApp/build/libs/*.jar diff --git a/.github/workflows/build-ios.yml b/.github/workflows/build-ios.yml deleted file mode 100644 index 1859bc9..0000000 --- a/.github/workflows/build-ios.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Build iOS - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - build-ios: - runs-on: macos-14 - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up JDK - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'zulu' - - - name: Install Xcode Command Line Tools - run: | - if ! xcode-select --print-path > /dev/null 2>&1; then - echo "Xcode Command Line Tools are not installed. Installing..." - xcode-select --install || echo "Failed to install Xcode Command Line Tools" - else - echo "Xcode Command Line Tools are already installed" - fi - - - name: Build iOS - run: | - xcodebuild -allowProvisioningUpdates -workspace iosApp/iosApp.xcodeproj/project.xcworkspace -scheme iosApp -configuration Debug -sdk iphoneos -destination name='iPhone 14' build CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY="" DEVELOPMENT_TEAM="" - - - name: Upload iOS artifacts - uses: actions/upload-artifact@v4 - with: - name: ios-framework - path: build/ios/Debug-iphonesimulator/*.app diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml deleted file mode 100644 index 7c28343..0000000 --- a/.github/workflows/build-macos.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Build macOS - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - build-macos: - runs-on: macos-14 - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Install Dependencies - run: brew install create-dmg - - - name: Build macOS app - run: | - xcodebuild -workspace iosApp/iosApp.xcodeproj/project.xcworkspace -scheme iosApp -configuration Release -sdk macosx clean build CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY="" DEVELOPMENT_TEAM="" - - - name: Create DMG - run: | - create-dmg 'path/to/your/app.app' 'path/to/output/directory' - # Adjust paths as needed - - - name: Upload DMG - uses: actions/upload-artifact@v3 - with: - name: macos-dmg - path: path/to/output/directory/*.dmg diff --git a/.github/workflows/build-web.yml b/.github/workflows/build-web.yml deleted file mode 100644 index 44a4edd..0000000 --- a/.github/workflows/build-web.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Build Web - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - build-web: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up JDK - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'zulu' - - - name: Cache Gradle packages - uses: actions/cache@v4 - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} - restore-keys: | - ${{ runner.os }}-gradle- - - - name: Build Web - run: ./gradlew wasmJsBrowserWebpack - - - name: Upload Web artifacts - uses: actions/upload-artifact@v4 - with: - name: web-app - path: webApp/build/distributions/*.tar.gz diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9adfa69..9e84651 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,173 +1,173 @@ -# name: Kotlin Multiplatform CI/CD - -# on: -# push: -# branches: -# - main -# pull_request: -# branches: -# - main - -# jobs: -# build-android: -# runs-on: ubuntu-latest -# steps: -# - name: Checkout code -# uses: actions/checkout@v4 - -# - name: Set up JDK -# uses: actions/setup-java@v4 -# with: -# java-version: '17' -# distribution: 'zulu' - -# - name: Cache Gradle packages -# uses: actions/cache@v4 -# with: -# path: ~/.gradle/caches -# key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} -# restore-keys: | -# ${{ runner.os }}-gradle- - -# - name: Build Android -# run: ./gradlew assembleRelease --info - -# - name: Run Unit Tests -# run: ./gradlew test - -# - name: Build iOS shared code -# run: ./gradlew :composeApp:compileKotlinIosSimulatorArm64 - -# - name: Upload Android artifacts -# uses: actions/upload-artifact@v4 -# with: -# name: android-release-apk -# path: composeApp/build/outputs/apk/release/*.apk - -# build-ios: -# runs-on: macos-14 -# steps: -# - name: Checkout code -# uses: actions/checkout@v4 - -# - name: Set up JDK -# uses: actions/setup-java@v4 -# with: -# java-version: '17' -# distribution: 'zulu' - -# - name: Install Xcode Command Line Tools -# run: | -# if ! xcode-select --print-path > /dev/null 2>&1; then -# echo "Xcode Command Line Tools are not installed. Installing..." -# xcode-select --install || echo "Failed to install Xcode Command Line Tools" -# else -# echo "Xcode Command Line Tools are already installed" -# fi - -# - name: Build iOS -# run: | -# xcodebuild -allowProvisioningUpdates -workspace iosApp/iosApp.xcodeproj/project.xcworkspace -scheme iosApp -configuration Debug -sdk iphoneos -destination name='iPhone 14' build CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY="" DEVELOPMENT_TEAM="" + name: Kotlin Multiplatform CI/CD + + on: + push: + branches: + - main + pull_request: + branches: + - main + + jobs: + build-android: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up JDK + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'zulu' + + - name: Cache Gradle packages + uses: actions/cache@v4 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} + restore-keys: | + ${{ runner.os }}-gradle- + + - name: Build Android + run: ./gradlew assembleRelease --info + + - name: Run Unit Tests + run: ./gradlew test + + - name: Build iOS shared code + run: ./gradlew :composeApp:compileKotlinIosSimulatorArm64 + + - name: Upload Android artifacts + uses: actions/upload-artifact@v4 + with: + name: android-release-apk + path: composeApp/build/outputs/apk/release/*.apk + + build-ios: + runs-on: macos-14 + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up JDK + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'zulu' + + - name: Install Xcode Command Line Tools + run: | + if ! xcode-select --print-path > /dev/null 2>&1; then + echo "Xcode Command Line Tools are not installed. Installing..." + xcode-select --install || echo "Failed to install Xcode Command Line Tools" + else + echo "Xcode Command Line Tools are already installed" + fi + + - name: Build iOS + run: | + xcodebuild -allowProvisioningUpdates -workspace iosApp/iosApp.xcodeproj/project.xcworkspace -scheme iosApp -configuration Debug -sdk iphoneos -destination name='iPhone 14' build CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY="" DEVELOPMENT_TEAM="" -# - name: Upload iOS artifacts -# uses: actions/upload-artifact@v4 -# with: -# name: ios-framework -# path: build/ios/Debug-iphonesimulator/*.app - -# build-desktop: -# runs-on: ubuntu-latest -# steps: -# - name: Checkout code -# uses: actions/checkout@v4 - -# - name: Set up JDK -# uses: actions/setup-java@v4 -# with: -# java-version: '17' -# distribution: 'zulu' - -# - name: Cache Gradle packages -# uses: actions/cache@v4 -# with: -# path: ~/.gradle/caches -# key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} -# restore-keys: | -# ${{ runner.os }}-gradle- - -# - name: Build Desktop -# run: ./gradlew desktopJar - -# - name: Upload Desktop artifacts -# uses: actions/upload-artifact@v4 -# with: -# name: desktop-jar -# path: composeApp/build/libs/*.jar - -# build-macos: -# runs-on: macos-14 -# steps: -# - name: Checkout code -# uses: actions/checkout@v4 - -# - name: Install Dependencies -# run: brew install create-dmg - -# - name: Build macOS app -# run: | -# xcodebuild -workspace iosApp/iosApp.xcodeproj/project.xcworkspace -scheme iosApp -configuration Release -sdk macosx clean build CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY="" DEVELOPMENT_TEAM="" + - name: Upload iOS artifacts + uses: actions/upload-artifact@v4 + with: + name: ios-framework + path: build/ios/Debug-iphonesimulator/*.app + + build-desktop: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up JDK + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'zulu' + + - name: Cache Gradle packages + uses: actions/cache@v4 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} + restore-keys: | + ${{ runner.os }}-gradle- + + - name: Build Desktop + run: ./gradlew desktopJar + + - name: Upload Desktop artifacts + uses: actions/upload-artifact@v4 + with: + name: desktop-jar + path: composeApp/build/libs/*.jar + + build-macos: + runs-on: macos-14 + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install Dependencies + run: brew install create-dmg + + - name: Build macOS app + run: | + xcodebuild -workspace iosApp/iosApp.xcodeproj/project.xcworkspace -scheme iosApp -configuration Release -sdk macosx clean build CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY="" DEVELOPMENT_TEAM="" -# - name: Create DMG -# run: | -# create-dmg 'path/to/your/app.app' 'path/to/output/directory' -# # Adjust paths as needed - -# - name: Upload DMG -# uses: actions/upload-artifact@v3 -# with: -# name: macos-dmg -# path: path/to/output/directory/*.dmg - -# build-web: -# runs-on: ubuntu-latest -# steps: -# - name: Checkout code -# uses: actions/checkout@v4 - -# - name: Set up JDK -# uses: actions/setup-java@v4 -# with: -# java-version: '17' -# distribution: 'zulu' - -# - name: Cache Gradle packages -# uses: actions/cache@v4 -# with: -# path: ~/.gradle/caches -# key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} -# restore-keys: | -# ${{ runner.os }}-gradle- - -# - name: Build Web -# run: ./gradlew wasmJsBrowserWebpack - -# - name: Upload Web artifacts -# uses: actions/upload-artifact@v4 -# with: -# name: web-app -# path: webApp/build/distributions/*.tar.gz - -# generate-artifact-links: -# runs-on: ubuntu-latest -# needs: [build-android, build-ios, build-desktop, build-web] -# steps: -# - name: Checkout code -# uses: actions/checkout@v4 - -# - name: List artifacts -# run: | -# echo "Artifact URLs for download:" -# echo "Android APK: ${{ needs.build-android.outputs.artifact-url }}" -# echo "iOS Framework: ${{ needs.build-ios.outputs.artifact-url }}" -# echo "Desktop JAR: ${{ needs.build-desktop.outputs.artifact-url }}" -# echo "Web App: ${{ needs.build-web.outputs.artifact-url }}" + - name: Create DMG + run: | + create-dmg 'path/to/your/app.app' 'path/to/output/directory' + # Adjust paths as needed + + - name: Upload DMG + uses: actions/upload-artifact@v3 + with: + name: macos-dmg + path: path/to/output/directory/*.dmg + + build-web: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up JDK + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'zulu' + + - name: Cache Gradle packages + uses: actions/cache@v4 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} + restore-keys: | + ${{ runner.os }}-gradle- + + - name: Build Web + run: ./gradlew wasmJsBrowserWebpack + + - name: Upload Web artifacts + uses: actions/upload-artifact@v4 + with: + name: web-app + path: webApp/build/distributions/*.tar.gz + + generate-artifact-links: + runs-on: ubuntu-latest + needs: [build-android, build-ios, build-desktop, build-web] + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: List artifacts + run: | + echo "Artifact URLs for download:" + echo "Android APK: ${{ needs.build-android.outputs.artifact-url }}" + echo "iOS Framework: ${{ needs.build-ios.outputs.artifact-url }}" + echo "Desktop JAR: ${{ needs.build-desktop.outputs.artifact-url }}" + echo "Web App: ${{ needs.build-web.outputs.artifact-url }}"