@@ -15,17 +15,38 @@ runs:
1515 steps :
1616 - name : Clean out dir from previous runner
1717 run : |
18- rm -rf cobalt/ src/out
18+ rm -rf src/out
1919 shell : bash
2020 - name : GN gen
2121 run : |
22- cd cobalt/src
23- cobalt/build/gn.py -p ${{ matrix.platform }} -C ${{ matrix.config }}
22+ cd src
23+ if [[ "${{ matrix.platform }}" == *"mac"* ]]; then
24+ cobalt/build/gn.py -p ${{ matrix.platform }} -C ${{ matrix.config }} --no-rbe --cc_wrapper=sccache
25+ else
26+ cobalt/build/gn.py -p ${{ matrix.platform }} -C ${{ matrix.config }}
27+ fi
28+ shell : bash
29+ - name : Set sccache debug env variable
30+ run : |
31+ echo "SCCACHE_ERROR_LOG=$HOME/tmp/sccache.log" >> $GITHUB_ENV
32+ echo "SCCACHE_LOG=debug" >> $GITHUB_ENV
2433 shell : bash
25- - name : List GN args
34+ - name : List GN args and sccache
35+ env :
36+ SCCACHE_ERROR_LOG : " /tmp/sccache.log"
37+ SCCACHE_LOG : " debug"
2638 run : |
27- cd cobalt/src
39+ cd src
40+ echo "$SCCACHE_GCS_KEY_PATH"
41+ echo "$SCCACHE"
42+ echo "$SCCACHE_GCS_BUCKET"
43+ echo "$SCCACHE_GCS_RW_MODE"
44+ echo "$SCCACHE_IDLE_TIMEOUT"
2845 gn args --list --short --overrides-only out/${{ matrix.platform }}_${{ matrix.config }}
46+ sccache --stop-server || true
47+ sleep 10
48+ sccache --start-server
49+ sccache --show-stats
2950 shell : bash
3051 - name : Get list of changed files
3152 if : github.event_name == 'pull_request'
3455 CHANGED_FILES_LIST : changed_files.txt
3556 run : |
3657 set -x
37- cd cobalt/ src
58+ cd src
3859 # GitHub's actions/checkout action, by default, checks out the merge commit when
3960 # a pull request event triggers a workflow. This merge commit represents the state
4061 # of the code as if the pull request had been merged into the base branch.
5576 DYN_TEST_TARGETS_JSON_FILE : out/${{ matrix.platform }}_${{ matrix.config }}/dyn_targets.json
5677 run : |
5778 set -x
58- cd cobalt/ src
79+ cd src
5980
6081 if [[ ! -f "${STATIC_TEST_TARGETS_JSON_FILE}" ]]; then
6182 echo "Static test targets file not found at ${STATIC_TEST_TARGETS_JSON_FILE}. Skipping step."
@@ -95,39 +116,45 @@ runs:
95116 uses : actions/upload-artifact@v4
96117 with :
97118 name : ${{ matrix.platform }}_test_targets_json
98- path : cobalt/ src/out/${{ matrix.platform }}_${{ matrix.config }}/test_targets.json
119+ path : src/out/${{ matrix.platform }}_${{ matrix.config }}/test_targets.json
99120 - name : Ninja build test targets
100121 if : ${{ matrix.config == 'devel' && fromJSON(steps.calculate-test-targets.outputs.test_targets_count || 0) > 0 }}
101122 id : build-test-targets
102123 run : |
103124 set -ex
104- cd cobalt/ src
125+ cd src
105126 test_targets=$(echo '${{ steps.calculate-test-targets.outputs.test_targets_json }}' | jq -cr 'join(" ")')
106127 time autoninja -C out/${{ matrix.platform }}_${{ matrix.config }} ${test_targets}
107128 shell : bash
108129 - name : Ninja build
109130 env :
110131 TARGETS_JSON : ${{ inputs.targets }}
132+ SCCACHE_ERROR_LOG : " /tmp/sccache.log"
133+ SCCACHE_LOG : " debug"
111134 run : |
112135 set -ex
113- cd cobalt/ src
136+ cd src
114137 TARGETS=$(echo "${TARGETS_JSON}" | jq -cr '. | join(" ")')
115- time autoninja -C out/${{ matrix.platform }}_${{ matrix.config }} ${TARGETS}
138+ python cobalt/build/gn.py out/tvos-arm64_devel -p tvos-arm64-simulator -c devel --no-rbe --args='cc_wrapper="sccache"'
139+ ninja -C out/tvos-arm64_devel starboard/nplb:nplb
140+ # time autoninja -C out/${{ matrix.platform }}_${{ matrix.config }} ${TARGETS}
141+ sccache --show-stats
142+ cat /tmp/sccache.log
116143 shell : bash
117- - name : Archive Android APKs
118- if : startsWith(matrix.platform, 'android') && matrix.config == 'qa'
119- uses : actions/upload-artifact@v4
120- with :
121- name : ${{ matrix.platform }} APKs
122- path : |
123- cobalt/ src/out/${{ matrix.platform }}_qa/apks/*.apk
124- cobalt/ src/out/${{ matrix.platform }}_qa/*_apk/*.apk
125- cobalt/ src/out/${{ matrix.platform }}_qa/gen/build_info.json
126- - name : Upload Test Artifacts
127- if : steps.build-test-targets.outcome == 'success'
128- uses : ./cobalt /src/.github/actions/upload_test_artifacts
129- with :
130- test_artifacts_key : ${{ inputs.test_artifacts_key }}
131- upload_on_host_test_artifacts : ${{ inputs.upload_on_host_test_artifacts == 'true' || inputs.upload_web_test_artifacts == 'true' }}
132- upload_on_device_test_artifacts : ${{ inputs.upload_on_device_test_artifacts }}
133- test_targets_json_file : ${{ inputs.test_targets_json_file }}
144+ # - name: Archive Android APKs
145+ # if: startsWith(matrix.platform, 'android') && matrix.config == 'qa'
146+ # uses: actions/upload-artifact@v4
147+ # with:
148+ # name: ${{ matrix.platform }} APKs
149+ # path: |
150+ # src/out/${{ matrix.platform }}_qa/apks/*.apk
151+ # src/out/${{ matrix.platform }}_qa/*_apk/*.apk
152+ # src/out/${{ matrix.platform }}_qa/gen/build_info.json
153+ # - name: Upload Test Artifacts
154+ # if: steps.build-test-targets.outcome == 'success'
155+ # uses: ./src/.github/actions/upload_test_artifacts
156+ # with:
157+ # test_artifacts_key: ${{ inputs.test_artifacts_key }}
158+ # upload_on_host_test_artifacts: ${{ inputs.upload_on_host_test_artifacts == 'true' || inputs.upload_web_test_artifacts == 'true' }}
159+ # upload_on_device_test_artifacts: ${{ inputs.upload_on_device_test_artifacts }}
160+ # test_targets_json_file: ${{ inputs.test_targets_json_file }}
0 commit comments