File tree Expand file tree Collapse file tree 11 files changed +55
-24
lines changed
Expand file tree Collapse file tree 11 files changed +55
-24
lines changed Original file line number Diff line number Diff line change 4646 java-version : " 17"
4747 - name : " Use cache"
4848 uses : actions/cache@v4
49+ timeout-minutes : 10
4950 with :
5051 key : " build-${{ hashFiles('conf-2.sh') }}"
5152 restore-keys : " build-"
@@ -54,12 +55,14 @@ jobs:
5455 - name : " Build the flashable OTA zip"
5556 id : " build"
5657 shell : bash
58+ timeout-minutes : 10
5759 run : |
5860 # Building...
5961 BUILD_TYPE='oss' '${{ github.workspace }}/build.sh'
6062 - name : " Attest build provenance"
6163 id : " attest"
6264 uses : actions/attest-build-provenance@v2
65+ timeout-minutes : 10
6366 if : " ${{ vars.NIGHTLY_ATTESTATION == 'true' && github.run_attempt == '1' && steps.build.outputs.ZIP_IS_ALPHA == 'true' && steps.build.outputs.ZIP_BUILD_TYPE_SUPPORTED == 'true' }}"
6467 with :
6568 subject-path : " ${{ steps.build.outputs.ZIP_FOLDER }}/*.zip"
@@ -195,6 +198,7 @@ jobs:
195198 keep-alive :
196199 name : " Keep alive"
197200 runs-on : ubuntu-latest
201+ timeout-minutes : 20
198202 if : " ${{ github.event_name == 'schedule' }}"
199203 permissions :
200204 actions : write # Needed to keep alive the workflow
@@ -208,13 +212,15 @@ jobs:
208212 sparse-checkout-cone-mode : false
209213 - name : " Ping cache" # Cache expiration: 7 days
210214 uses : actions/cache@v4
215+ timeout-minutes : 10
211216 with :
212217 key : " build-${{ hashFiles('conf-2.sh') }}"
213218 path : " cache/build"
214219 enableCrossOsArchive : true
215220 lookup-only : true
216221 - name : " Keep workflow alive"
217222 uses : actions/github-script@v7
223+ timeout-minutes : 10
218224 env :
219225 WORKFLOW_REF : " ${{ github.workflow_ref }}"
220226 with :
Original file line number Diff line number Diff line change 1616 release :
1717 name : " Release"
1818 runs-on : ubuntu-latest
19+ timeout-minutes : 30
1920 if : " ${{ startsWith(github.ref, 'refs/tags/v') && github.event_name != 'pull_request' }}"
2021 permissions :
2122 contents : write
3233 - name : " Build"
3334 id : " build"
3435 shell : bash
36+ timeout-minutes : 10
3537 run : |
3638 ### Building...
3739 '${{ github.workspace }}/gradlew' clean buildOtaOSS
Original file line number Diff line number Diff line change 1212 shellchecker :
1313 name : " ShellChecker"
1414 runs-on : ubuntu-latest
15+ timeout-minutes : 10
1516
1617 steps :
1718 - name : " Checkout sources"
2223 json-yaml-validate :
2324 name : " JSON and YAML"
2425 runs-on : ubuntu-latest
26+ timeout-minutes : 10
2527
2628 steps :
2729 - name : " Checkout sources"
Original file line number Diff line number Diff line change 1616 dependency-submission :
1717 name : " Dependency submission"
1818 runs-on : ubuntu-latest
19+ timeout-minutes : 10
1920 if : " ${{ github.repository_owner == 'micro5k' && github.event_name == 'push' }}"
2021 permissions :
2122 contents : write
Original file line number Diff line number Diff line change @@ -27,22 +27,27 @@ jobs:
2727 java-version : " 17"
2828 - name : " Setup Ruby"
2929 uses : ruby/setup-ruby@v1
30+ timeout-minutes : 10
3031 with :
3132 ruby-version : " 3.4"
3233 - name : " Install Bashcov and simplecov-lcov"
34+ shell : bash
35+ timeout-minutes : 10
3336 run : |
3437 # Installing Bashcov and simplecov-lcov...
3538 gem install bashcov:3.2.0 simplecov-lcov
3639 - name : " Build (with coverage)"
3740 id : " build"
3841 shell : bash
42+ timeout-minutes : 10
3943 run : |
4044 # Executing code coverage...
4145 export BUILD_TYPE=oss
4246 #sudo apt-get -qq -y install moreutils 1>/dev/null
4347 bashcov '${{ github.workspace }}/build.sh' # To timestamp the output pipe it to: TZ=UTC ts '[%H:%M:%S]'
4448 - name : " Testing (with coverage)"
4549 shell : bash
50+ timeout-minutes : 10
4651 if : " ${{ steps.build.outputs.ZIP_BUILD_TYPE_SUPPORTED == 'true' }}"
4752 run : |
4853 # Testing of zip installation...
7580 - name : " Upload coverage reports to Codecov"
7681 if : " ${{ steps.codecov-token.outputs.TOKEN_SET == 'true' && github.ref == 'refs/heads/main' && github.event_name != 'pull_request' }}"
7782 uses : codecov/codecov-action@v5
83+ timeout-minutes : 10
7884 with :
7985 fail_ci_if_error : true
8086 token : " ${{ secrets.CODECOV_TOKEN }}"
8995 - name : " Upload coverage reports to Codacy"
9096 if : " ${{ steps.codacy-token.outputs.TOKEN_SET == 'true' && github.ref == 'refs/heads/main' && github.event_name != 'pull_request' }}"
9197 uses : codacy/codacy-coverage-reporter-action@v1
98+ timeout-minutes : 10
9299 with :
93100 project-token : " ${{ secrets.CODACY_PROJECT_TOKEN }}"
Original file line number Diff line number Diff line change 1313 tag-creation :
1414 name : " Tag creation"
1515 runs-on : ubuntu-latest
16+ timeout-minutes : 10
1617 if : " ${{ ! startsWith(github.ref, 'refs/tags/') }}"
1718 permissions :
1819 contents : write # Needed to create a tag
Original file line number Diff line number Diff line change 2424 workflow_dispatch :
2525
2626jobs :
27- base :
28- name : " Base job "
27+ base-job :
28+ name : " Base"
2929 runs-on : ubuntu-latest
30+ timeout-minutes : 10
3031
3132 steps :
3233 - name : " Checkout sources"
5354 makefile-validation :
5455 name : " Validate makefile"
5556 runs-on : ubuntu-latest
57+ timeout-minutes : 10
5658
5759 steps :
5860 - name : " Checkout sources"
Original file line number Diff line number Diff line change 2323 workflow_dispatch :
2424
2525jobs :
26- base :
26+ base-job :
2727 strategy :
28+ fail-fast : false
2829 matrix :
2930 os : [ubuntu-latest, windows-latest, macos-latest]
30- fail-fast : false
3131 name : " ${{ matrix.os }}"
3232 runs-on : " ${{ matrix.os }}"
33+ timeout-minutes : 20
3334 env :
3435 cache-key : " shells"
3536
Original file line number Diff line number Diff line change @@ -30,15 +30,26 @@ stages:
3030.build-oss-job :
3131 stage : build
3232 interruptible : true
33+ timeout : " 5 minutes"
3334 rules :
3435 - if : $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
36+ changes :
37+ - " LICENSES/**"
38+ - " includes/**"
39+ - " tools/**"
40+ - " zip-content/**"
41+ - " CHANGELOG.rst"
42+ - " LICENSE.rst"
43+ - " build.sh"
44+ - " conf-*.sh"
3545 - if : $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_TAG && $CI_COMMIT_TAG != "nightly"
3646 cache : []
3747 script : " BUILD_TYPE='oss' './build.sh'"
3848
3949build-job :
4050 stage : build
4151 interruptible : true
52+ timeout : " 5 minutes"
4253 rules :
4354 - if : $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
4455 changes :
@@ -54,11 +65,12 @@ build-job:
5465 artifacts :
5566 paths :
5667 - " output/*.zip*"
57- expire_in : " 20 minutes"
68+ expire_in : " 15 minutes"
5869
5970# Cache expiration: 14 days
6071ping-cache :
6172 stage : build
73+ timeout : " 5 minutes"
6274 rules :
6375 - if : $CI_PIPELINE_SOURCE == "schedule"
6476 when : always
Original file line number Diff line number Diff line change @@ -439,7 +439,7 @@ _parse_webpage_and_get_url()
439439
440440 # shellcheck disable=SC3040 # Ignore: In POSIX sh, set option pipefail is undefined
441441 {
442- # IMPORTANT: We have to avoid "printf: write error: Broken pipe" when a string is piped to "grep -q" or "grep -m 1 "
442+ # IMPORTANT: We have to avoid "printf: write error: Broken pipe" when a string is piped to "grep -q" or "grep -m1 "
443443 test " ${USING_PIPEFAIL:- false} " = ' false' || set +o pipefail
444444 _parsed_code=" $( printf 2> /dev/null ' %s\n' " ${_parsed_code:? } " | grep -o -m 1 -e " ${_search_pattern:? } " ) " || _status=" ${?} "
445445 test " ${USING_PIPEFAIL:- false} " = ' false' || set -o pipefail
You can’t perform that action at this time.
0 commit comments