diff --git a/.github/workflows/daily_build.yml b/.github/workflows/daily_build.yml index f23d9a6f55fe..95157159d3d8 100644 --- a/.github/workflows/daily_build.yml +++ b/.github/workflows/daily_build.yml @@ -1,6 +1,7 @@ name: Ballerina daily build on: + workflow_dispatch: schedule: - cron: '30 18 * * *' # 00:00 in LK time (GMT+5:30) - cron: '30 6 * * *' # 12:00 in LK time (GMT+5:30) diff --git a/.github/workflows/pull_request_full_build.yml b/.github/workflows/pull_request_full_build.yml index 4a208fac63f2..4fca5c6bc88f 100644 --- a/.github/workflows/pull_request_full_build.yml +++ b/.github/workflows/pull_request_full_build.yml @@ -86,11 +86,26 @@ jobs: wget https://raw.githubusercontent.com/ballerina-platform/ballerina-release/master/dependabot/resources/extensions.json wget https://raw.githubusercontent.com/ballerina-platform/ballerina-distribution/2201.0.x/gradle.properties +# - name: Clone Modules +# run: | +# for module_name in $(jq -r '.standard_library| .[] | select(.level==${{ matrix.level }}) | .name' extensions.json); \ +# do git clone https://github.com/ballerina-platform/${module_name}.git; \ +# done - name: Clone Modules run: | - for module_name in $(jq -r '.standard_library| .[] | select(.level==${{ matrix.level }}) | .name' extensions.json); \ - do git clone https://github.com/ballerina-platform/${module_name}.git; \ + for module_name in $(jq -r '.standard_library| .[] | select(.level==${{ matrix.level }}) | .name' extensions.json); do + echo "Cloning module: ${module_name}" + repo_url=https://github.com/ballerina-platform/${module_name}.git + branch=metrics-logs + if git ls-remote --heads "$repo_url" "$branch" | grep -q "$branch"; then + echo "Branch '$branch' found." + git clone -b "$branch" --single-branch "$repo_url" + else + echo "Branch '$branch' not found. Cloning default branch '$default_branch' instead." + git clone $repo_url + fi done + shell: bash - name: Update Lang Version in Module run: | @@ -98,6 +113,15 @@ jobs: perl -pi -e "s/^\s*ballerinaLangVersion=.*/ballerinaLangVersion=${{ needs.build-lang.outputs.lang_version }}/" ${module_name}/gradle.properties; \ done + - name: Update Observe Module Version + run: | + OBSERVE_VERSION=1.4.0-20241220-100300-6b4cf7a + OBSERVE_INTERNAL_VERSION=1.4.0-20250103-120100-3c54658 + for module_name in $(jq -r '.standard_library| .[] | select(.level==${{ matrix.level }}) | .name' extensions.json); do \ + perl -pi -e "s/^\s*observeVersion=.*/observeVersion=${OBSERVE_VERSION}/" ${module_name}/gradle.properties && \ + perl -pi -e "s/^\s*observeInternalVersion=.*/observeInternalVersion=${OBSERVE_INTERNAL_VERSION}/" ${module_name}/gradle.properties; \ + done + - name: Build Module run: | for module_name in $(jq -r '.standard_library| .[] | select(.level==${{ matrix.level }}) | .name' extensions.json); do \ @@ -142,6 +166,13 @@ jobs: run: | perl -pi -e "s/^\s*ballerinaLangVersion=.*/ballerinaLangVersion=${{ needs.build-lang.outputs.lang_version }}/" gradle.properties + - name: Update Observe Module Version + run: | + OBSERVE_VERSION=1.4.0-20241220-100300-6b4cf7a + OBSERVE_INTERNAL_VERSION=1.4.0-20250103-120100-3c54658 + perl -pi -e "s/^\s*observeVersion=.*/observeVersion=${OBSERVE_VERSION}/" gradle.properties + perl -pi -e "s/^\s*observeInternalVersion=.*/observeInternalVersion=${OBSERVE_INTERNAL_VERSION}/" gradle.properties + - name: Build Module run: ./gradlew clean build --stacktrace --scan --console=plain --no-daemon --continue -x :project-api-tests:test env: