Lines Matching +full:docker +full:- +full:run
1 ---
7 # yamllint disable-line rule:truthy
12 # eg. "Zephyr-pull_request-my_fork_branch_to_merge"
13 # eg. "Zephyr-push-refs/heads/my_branch_merging"
14 group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }}
15 cancel-in-progress: true
19 manifest-check:
20 runs-on: ubuntu-latest
22 - uses: actions/checkout@v3
26 - name: plain west update
27 run: |
32 : use 'west update --narrow' which is faster but
33 : also able to fetch "wild" SHA1s from any random place! --narrow
39 west init -l
40 west update --fetch-opt=--filter=tree:0
46 - name: git submodules consistency
47 run: |
50 git submodule update --init --recursive
53 if git status --porcelain=v2 | grep ^ ; then
61 build-linux:
62 runs-on: ubuntu-20.04
64 fail-fast: false
69 # - IPC3 default
71 tgl tgl-h, # UNSUPPORTED! Will be removed
72 # - IPC4 default
75 -i IPC4 tgl tgl-h,
79 "https://github.com/zephyrproject-rtos/zephyr main",
83 - uses: actions/checkout@v3
88 fetch-depth: 0
91 # As of December 2022 `--shallow-exclude=v3.2.0-rc3` fixes `git
95 # Ideally, the --shallow-exclude= argument should be regularly
99 # git fetch --shallow-since='5 months ago' because Zephyr follows
100 # a "roughly 4-month release" but for now that saves only 100MB
103 # TODO: try replacing --narrow and --depth with some
104 # --fetch-opt=--filter=?
105 # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
106 - name: west clones
108 # Get some git tags in Zephyr. keep in sync with build-windows below
109 run: pip3 install west && cd workspace/sof/ && west init -l &&
110 west update --narrow --fetch-opt=--depth=5 &&
111 git -C ../zephyr fetch --shallow-exclude=v3.2.0-rc3
113 - name: select zephyr revision
114 run: cd workspace/zephyr/ &&
119 git log --oneline -n 5 --decorate --graph --no-abbrev-commit
123 # https://github.com/ScribeMD/docker-cache/issues/304
125 - name: Download docker image && ls /opt/toolchains/
126 run: cd workspace && ./sof/zephyr/docker-run.sh ls -l /opt/toolchains/
128 # https://github.com/zephyrproject-rtos/docker-image
130 # -e https_proxy=...
131 - name: build
132 run: cd workspace && ./sof/zephyr/docker-run.sh
133 ./sof/zephyr/docker-build.sh --cmake-args=-DEXTRA_CFLAGS=-Werror
134 --cmake-args=--warn-uninitialized ${{ matrix.IPC_platforms }}
136 - name: Upload build artifacts
137 uses: actions/upload-artifact@v3
140 name: linux-build ${{ matrix.IPC_platforms }}
142 ${{ github.workspace }}/workspace/build-sof-staging
145 build-windows:
146 runs-on: windows-latest
148 fail-fast: false
149 # FIXME: Create common matrix for build-linux and build-windows
154 # - IPC3 default
156 tgl tgl-h, # UNSUPPORTED! Will be removed
157 # - IPC4 default
160 -i IPC4 tgl tgl-h,
164 - uses: actions/checkout@v3
166 fetch-depth: 0
172 - name: Cache unzip
173 id: cache-unzip
176 path: unzip-5.51-1-bin.zip
177 key: ${{ runner.os }}-cache-unzip-5-51-1
179 - name: Cache wget
180 id: cache-wget
183 path: wget-1.11.4-1-bin.zip
184 key: ${{ runner.os }}-cache-wget-1-11-4-1
187 # sof/zephyr/docker-run.sh
188 - name: Cache Zephyr SDK 0.15.2
189 id: cache-zephyr-sdk
192 path: zephyr-sdk-0.15.2_windows-x86_64.zip
193 key: ${{ runner.os }}-cache-zephyr-sdk-0-15-2
196 - name: Download unzip
197 if: ${{ steps.cache-unzip.outputs.cache-hit != 'true' }}
198 run: |
199 curl -L -o unzip-5.51-1-bin.zip `
200 https://gnuwin32.sourceforge.net/downlinks/unzip-bin-zip.php
203 - name: Download wget
204 if: ${{ steps.cache-wget.outputs.cache-hit != 'true' }}
205 run: |
206 curl -L -O http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-bin.zip
208 - name: Download Zephyr SDK 0.15.2
209 if: ${{ steps.cache-zephyr-sdk.outputs.cache-hit != 'true' }}
210 run: | # yamllint disable-line rule:line-length
211 curl -L -O `
212 …https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.15.2/zephyr-sdk-0.15.2_windows-x…
215 - name: Unzip downloaded packages
216 run: 7z x *.zip -o*
218 - name: Add unzip to system PATH
219 run: |
220 echo "${{ github.workspace }}/unzip-5.51-1-bin/bin" | `
221 Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
223 - name: Add wget to system PATH
224 run: |
225 echo "${{ github.workspace }}/wget-1.11.4-1-bin/bin" | `
226 Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
228 # Install Zephyr SDK - all toolchains including Host Tools
232 - name: Install Zephyr SDK
233 run: zephyr-sdk-0.15.2_windows-x86_64/zephyr-sdk-0.15.2/setup.cmd /t all /h /c
235 - name: Setup Python
236 uses: actions/setup-python@v4
238 python-version: '3.8'
240 - name: West install
241 run: pip3 install west
243 - name: West clone
244 working-directory: ${{ github.workspace }}/workspace
245 # Keep in sync with build-linux above
246 run: west init -l sof &&
247 west update --narrow --fetch-opt=--depth=5 &&
248 git -C zephyr fetch --shallow-exclude=v3.2.0-rc3
251 - name: Setup Python
252 uses: actions/setup-python@v4
253 id: cache-python
255 python-version: '3.8'
257 cache-dependency-path: workspace/zephyr/scripts/requirements.txt
260 - name: Validate python PIP cache
261 working-directory: ${{ github.workspace }}/workspace
262 run: pip install -r zephyr/scripts/requirements.txt
265 - name: Initialize MSYS2
266 uses: msys2/setup-msys2@v2
269 install: gcc openssl-devel
270 path-type: inherit
272 - name: Build
274 working-directory: ${{ github.workspace }}/workspace
275 run: python sof/scripts/xtensa-build-zephyr.py
276 --no-interactive
277 --cmake-args=-DEXTRA_CFLAGS=-Werror
278 --cmake-args=--warn-uninitialized ${{ matrix.platforms }}
280 - name: Upload build artifacts
281 uses: actions/upload-artifact@v3
283 name: windows-build ${{ matrix.platforms}}
285 ${{ github.workspace }}/workspace/build-sof-staging
289 compare-linux-win:
291 runs-on: ubuntu-latest
293 # - We don't compare _all_ the builds, and
294 # - even when some of the ones we compare fail, we still want to compare the rest.
296 needs: [build-linux, build-windows]
299 - uses: actions/checkout@v3
307 - name: Download Windows and Linux builds
308 uses: actions/download-artifact@v3
310 - name: apt-get dos2unix
311 run: sudo apt-get update; sudo apt-get -y install dos2unix
313 - name: Delete and fix expected differences
314 run: |
315 ls -l
316 # run it twice to make sure it's idempotent
318 ./sof/zephyr/scripts/clean-expected-release-differences.sh \
319 windows-build* linux-build*
322 - name: Compare Linux vs Windows builds
323 run: |
326 for windir in windows-build*; do
327 lindir=linux-"${windir#windows-}"
328 diff -qr "$lindir" "$windir" || : $((diffs++))