@@ -15,17 +15,34 @@ 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+ cobalt/build/gn.py -p ${{ matrix.platform }} -C ${{ matrix.config }} --no-rbe --cc_wrapper=sccache
2424 shell : bash
25- - name : List GN args
25+ - name : Set sccache debug env variable
2626 run : |
27- cd cobalt/src
27+ echo "SCCACHE_ERROR_LOG=$HOME/tmp/sccache.log" >> $GITHUB_ENV
28+ echo "SCCACHE_LOG=debug" >> $GITHUB_ENV
29+ shell : bash
30+ - name : List GN args and sccache
31+ env :
32+ SCCACHE_ERROR_LOG : " /tmp/sccache.log"
33+ SCCACHE_LOG : " debug"
34+ run : |
35+ cd src
36+ echo "$SCCACHE_GCS_KEY_PATH"
37+ echo "$SCCACHE"
38+ echo "$SCCACHE_GCS_BUCKET"
39+ echo "$SCCACHE_GCS_RW_MODE"
40+ echo "$SCCACHE_IDLE_TIMEOUT"
2841 gn args --list --short --overrides-only out/${{ matrix.platform }}_${{ matrix.config }}
42+ sccache --stop-server || true
43+ sleep 10
44+ sccache --start-server
45+ sccache --show-stats
2946 shell : bash
3047 - name : Get list of changed files
3148 if : github.event_name == 'pull_request'
3451 CHANGED_FILES_LIST : changed_files.txt
3552 run : |
3653 set -x
37- cd cobalt/ src
54+ cd src
3855 # GitHub's actions/checkout action, by default, checks out the merge commit when
3956 # a pull request event triggers a workflow. This merge commit represents the state
4057 # of the code as if the pull request had been merged into the base branch.
5572 DYN_TEST_TARGETS_JSON_FILE : out/${{ matrix.platform }}_${{ matrix.config }}/dyn_targets.json
5673 run : |
5774 set -x
58- cd cobalt/ src
75+ cd src
5976
6077 if [[ ! -f "${STATIC_TEST_TARGETS_JSON_FILE}" ]]; then
6178 echo "Static test targets file not found at ${STATIC_TEST_TARGETS_JSON_FILE}. Skipping step."
@@ -95,39 +112,46 @@ runs:
95112 uses : actions/upload-artifact@v4
96113 with :
97114 name : ${{ matrix.platform }}_test_targets_json
98- path : cobalt/ src/out/${{ matrix.platform }}_${{ matrix.config }}/test_targets.json
115+ path : src/out/${{ matrix.platform }}_${{ matrix.config }}/test_targets.json
99116 - name : Ninja build test targets
100117 if : ${{ matrix.config == 'devel' && fromJSON(steps.calculate-test-targets.outputs.test_targets_count || 0) > 0 }}
101118 id : build-test-targets
102119 run : |
103120 set -ex
104- cd cobalt/ src
121+ cd src
105122 test_targets=$(echo '${{ steps.calculate-test-targets.outputs.test_targets_json }}' | jq -cr 'join(" ")')
106123 time autoninja -C out/${{ matrix.platform }}_${{ matrix.config }} ${test_targets}
107124 shell : bash
108125 - name : Ninja build
109126 env :
110127 TARGETS_JSON : ${{ inputs.targets }}
128+ SCCACHE_ERROR_LOG : " /tmp/sccache.log"
129+ SCCACHE_LOG : " debug"
130+ GN_EXTRA_ARGS : " cc_wrapper=\" sccache\" "
111131 run : |
112132 set -ex
113- cd cobalt/ src
133+ cd src
114134 TARGETS=$(echo "${TARGETS_JSON}" | jq -cr '. | join(" ")')
115- time autoninja -C out/${{ matrix.platform }}_${{ matrix.config }} ${TARGETS}
135+ python cobalt/build/gn.py out/tvos-arm64_devel -p tvos-arm64-simulator -c devel --no-rbe --cc_wrapper=sccache
136+ ninja -C out/tvos-arm64_devel starboard/nplb:nplb
137+ # time autoninja -C out/${{ matrix.platform }}_${{ matrix.config }} ${TARGETS}
138+ sccache --show-stats
139+ cat /tmp/sccache.log
116140 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 }}
141+ # - name: Archive Android APKs
142+ # if: startsWith(matrix.platform, 'android') && matrix.config == 'qa'
143+ # uses: actions/upload-artifact@v4
144+ # with:
145+ # name: ${{ matrix.platform }} APKs
146+ # path: |
147+ # src/out/${{ matrix.platform }}_qa/apks/*.apk
148+ # src/out/${{ matrix.platform }}_qa/*_apk/*.apk
149+ # src/out/${{ matrix.platform }}_qa/gen/build_info.json
150+ # - name: Upload Test Artifacts
151+ # if: steps.build-test-targets.outcome == 'success'
152+ # uses: ./src/.github/actions/upload_test_artifacts
153+ # with:
154+ # test_artifacts_key: ${{ inputs.test_artifacts_key }}
155+ # upload_on_host_test_artifacts: ${{ inputs.upload_on_host_test_artifacts == 'true' || inputs.upload_web_test_artifacts == 'true' }}
156+ # upload_on_device_test_artifacts: ${{ inputs.upload_on_device_test_artifacts }}
157+ # test_targets_json_file: ${{ inputs.test_targets_json_file }}
0 commit comments