diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index d572813..816c35f 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -1,21 +1,31 @@ name: Android CI -on: pull_request +on: + pull_request: + push: + branches: [ main ] -jobs: - build: +# Cancel superseded runs for the same PR/branch +concurrency: + group: android-${{ github.head_ref || github.ref }} + cancel-in-progress: true - runs-on: macos-latest +permissions: + contents: read +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 30 steps: - - uses: actions/checkout@v7 - - name: set up JDK 24 - uses: actions/setup-java@v5 - with: - distribution: 'zulu' - java-version: 24 - - name: Build android app - run: ./gradlew assembleDebug - - name: Run Unit Tests - run: ./gradlew :composeApp:jvmTest - + - uses: actions/checkout@v7 + - name: set up JDK 24 + uses: actions/setup-java@v5 + with: + distribution: 'zulu' + java-version: 24 + - uses: gradle/actions/setup-gradle@v6 + - name: Build android app + run: ./gradlew assembleDebug + - name: Run Unit Tests + run: ./gradlew :composeApp:jvmTest diff --git a/.github/workflows/build-and-publish-web.yml b/.github/workflows/build-and-publish-web.yml index e046111..d356bea 100644 --- a/.github/workflows/build-and-publish-web.yml +++ b/.github/workflows/build-and-publish-web.yml @@ -4,22 +4,25 @@ name: Build and Publish on: workflow_dispatch: +permissions: + contents: write + jobs: build: name: Test and Build runs-on: ubuntu-latest + timeout-minutes: 30 steps: + - name: Fetch Sources + uses: actions/checkout@v7 - # Setup Java 1.8 environment for the next steps - name: Setup Java uses: actions/setup-java@v5 with: distribution: 'zulu' java-version: 17 - # Check out current repository - - name: Fetch Sources - uses: actions/checkout@v7 + - uses: gradle/actions/setup-gradle@v6 # Build application - name: Build @@ -32,4 +35,4 @@ jobs: with: BRANCH: gh-pages # The branch the action should deploy to. FOLDER: composeApp/build/dist/wasmJs/productionExecutable # The folder the action should deploy. - CLEAN: true # Automatically remove deleted files from the deploy branch \ No newline at end of file + CLEAN: true # Automatically remove deleted files from the deploy branch diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index bd5a11e..1318bf9 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -1,22 +1,36 @@ name: iOS CI -on: pull_request +on: + pull_request: + push: + branches: [ main ] -# Cancel any current or previous job from the same PR +# Cancel superseded runs for the same PR/branch concurrency: - group: ios-${{ github.head_ref }} + group: ios-${{ github.head_ref || github.ref }} cancel-in-progress: true +permissions: + contents: read jobs: build: runs-on: macos-latest + timeout-minutes: 45 steps: - uses: actions/checkout@v7 - uses: actions/setup-java@v5 with: distribution: 'zulu' java-version: 24 + - uses: gradle/actions/setup-gradle@v6 + - name: Cache Kotlin/Native (konan) + uses: actions/cache@v6 + with: + path: ~/.konan + key: ${{ runner.os }}-konan-${{ hashFiles('**/libs.versions.toml') }} + restore-keys: | + ${{ runner.os }}-konan- - name: Set Xcode Version 26.3 shell: bash @@ -25,6 +39,3 @@ jobs: - name: Build iOS app run: xcodebuild -allowProvisioningUpdates -workspace iosApp/iosApp.xcodeproj/project.xcworkspace -configuration Debug -scheme iosApp -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' - - -