|
| 1 | +name: ci |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [main, master] |
| 6 | + pull_request: |
| 7 | + workflow_dispatch: |
| 8 | + |
| 9 | +# Cancel superseded runs for the same ref to save CI minutes. |
| 10 | +concurrency: |
| 11 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 12 | + cancel-in-progress: true |
| 13 | + |
| 14 | +jobs: |
| 15 | + parse: |
| 16 | + # poky-the-distro covers up to walnascar; whinlatter+ no longer |
| 17 | + # publish a poky combo repo and are handled by parse-oe-core below. |
| 18 | + name: parse (${{ matrix.poky_branch }} / ${{ matrix.machine }}) |
| 19 | + runs-on: ubuntu-22.04 |
| 20 | + strategy: |
| 21 | + fail-fast: false |
| 22 | + matrix: |
| 23 | + poky_branch: [kirkstone, scarthgap, styhead, walnascar] |
| 24 | + # MACHINE controls which Microsoft binary tarball the recipe |
| 25 | + # resolves to: |
| 26 | + # qemux86-64 -> linux-x64 |
| 27 | + # qemuarm64 -> linux-arm64 |
| 28 | + # qemuarm -> linux-armhf |
| 29 | + machine: [qemux86-64, qemuarm64, qemuarm] |
| 30 | + steps: |
| 31 | + - uses: actions/checkout@v4 |
| 32 | + with: |
| 33 | + path: meta-vscode |
| 34 | + |
| 35 | + - name: Free disk space |
| 36 | + run: | |
| 37 | + sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc \ |
| 38 | + /opt/hostedtoolcache/CodeQL /usr/local/share/boost \ |
| 39 | + "$AGENT_TOOLSDIRECTORY" |
| 40 | +
|
| 41 | + - name: Cache poky checkout |
| 42 | + uses: actions/cache@v4 |
| 43 | + with: |
| 44 | + path: poky |
| 45 | + key: poky-${{ matrix.poky_branch }}-v1 |
| 46 | + restore-keys: poky-${{ matrix.poky_branch }}- |
| 47 | + |
| 48 | + - name: Clone poky |
| 49 | + run: | |
| 50 | + if [ ! -d poky/.git ]; then |
| 51 | + git clone --depth 1 --branch ${{ matrix.poky_branch }} \ |
| 52 | + https://git.yoctoproject.org/poky poky |
| 53 | + else |
| 54 | + git -C poky fetch --depth 1 origin \ |
| 55 | + ${{ matrix.poky_branch }}:refs/remotes/origin/${{ matrix.poky_branch }} |
| 56 | + git -C poky checkout -B ${{ matrix.poky_branch }} \ |
| 57 | + refs/remotes/origin/${{ matrix.poky_branch }} |
| 58 | + fi |
| 59 | +
|
| 60 | + - name: Install Yocto host dependencies |
| 61 | + run: | |
| 62 | + sudo apt-get update |
| 63 | + sudo apt-get install -y --no-install-recommends \ |
| 64 | + gawk wget git diffstat unzip texinfo gcc build-essential chrpath \ |
| 65 | + socat cpio python3 python3-pip python3-pexpect xz-utils debianutils \ |
| 66 | + iputils-ping python3-git python3-jinja2 python3-subunit zstd liblz4-tool \ |
| 67 | + file locales libacl1 |
| 68 | + sudo locale-gen en_US.UTF-8 |
| 69 | +
|
| 70 | + - name: Parse the layer (MACHINE=${{ matrix.machine }}) |
| 71 | + env: |
| 72 | + LANG: en_US.UTF-8 |
| 73 | + LC_ALL: en_US.UTF-8 |
| 74 | + run: | |
| 75 | + set -eo pipefail |
| 76 | + cd poky |
| 77 | + source oe-init-build-env build |
| 78 | + cat >> conf/local.conf <<EOF |
| 79 | + MACHINE = "${{ matrix.machine }}" |
| 80 | + BB_NUMBER_THREADS = "2" |
| 81 | + PARALLEL_MAKE = "-j 2" |
| 82 | + CONF_VERSION = "2" |
| 83 | + EOF |
| 84 | + bitbake-layers add-layer "$GITHUB_WORKSPACE/meta-vscode" |
| 85 | + bitbake-layers show-layers |
| 86 | + bitbake -p |
| 87 | +
|
| 88 | + - name: Fetch vscode (MACHINE=${{ matrix.machine }}) |
| 89 | + env: |
| 90 | + LANG: en_US.UTF-8 |
| 91 | + LC_ALL: en_US.UTF-8 |
| 92 | + run: | |
| 93 | + set -eo pipefail |
| 94 | + cd poky |
| 95 | + source oe-init-build-env build |
| 96 | + bitbake -c fetch vscode |
| 97 | +
|
| 98 | + parse-oe-core: |
| 99 | + # whinlatter and wrynose dropped the combined poky repository, so |
| 100 | + # we clone openembedded-core + bitbake separately. |
| 101 | + name: parse (${{ matrix.release }} / ${{ matrix.machine }}) |
| 102 | + runs-on: ubuntu-22.04 |
| 103 | + strategy: |
| 104 | + fail-fast: false |
| 105 | + matrix: |
| 106 | + release: [whinlatter, wrynose] |
| 107 | + machine: [qemux86-64, qemuarm64, qemuarm] |
| 108 | + # include adds the bitbake-version axis as a value-mapping |
| 109 | + # against an existing matrix axis (release); GHA pairs the |
| 110 | + # extra key (bitbake) with each existing combo that shares the |
| 111 | + # release value. |
| 112 | + include: |
| 113 | + - release: whinlatter |
| 114 | + bitbake: '2.16' |
| 115 | + - release: wrynose |
| 116 | + bitbake: '2.18' |
| 117 | + steps: |
| 118 | + - uses: actions/checkout@v4 |
| 119 | + with: |
| 120 | + path: meta-vscode |
| 121 | + |
| 122 | + - name: Free disk space |
| 123 | + run: | |
| 124 | + sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc \ |
| 125 | + /opt/hostedtoolcache/CodeQL /usr/local/share/boost \ |
| 126 | + "$AGENT_TOOLSDIRECTORY" |
| 127 | +
|
| 128 | + - name: Clone oe-core (${{ matrix.release }}) |
| 129 | + run: | |
| 130 | + git clone --depth 1 --branch ${{ matrix.release }} \ |
| 131 | + https://git.openembedded.org/openembedded-core oe-core |
| 132 | +
|
| 133 | + - name: Clone bitbake (${{ matrix.bitbake }}) |
| 134 | + run: | |
| 135 | + git clone --depth 1 --branch ${{ matrix.bitbake }} \ |
| 136 | + https://git.openembedded.org/bitbake oe-core/bitbake |
| 137 | +
|
| 138 | + - name: Install Yocto host dependencies |
| 139 | + run: | |
| 140 | + sudo apt-get update |
| 141 | + sudo apt-get install -y --no-install-recommends \ |
| 142 | + gawk wget git diffstat unzip texinfo gcc build-essential chrpath \ |
| 143 | + socat cpio python3 python3-pip python3-pexpect xz-utils debianutils \ |
| 144 | + iputils-ping python3-git python3-jinja2 python3-subunit zstd liblz4-tool \ |
| 145 | + file locales libacl1 |
| 146 | + sudo locale-gen en_US.UTF-8 |
| 147 | +
|
| 148 | + - name: Parse the layer (MACHINE=${{ matrix.machine }}) |
| 149 | + env: |
| 150 | + LANG: en_US.UTF-8 |
| 151 | + LC_ALL: en_US.UTF-8 |
| 152 | + run: | |
| 153 | + set -eo pipefail |
| 154 | + cd oe-core |
| 155 | + source oe-init-build-env build |
| 156 | + cat >> conf/local.conf <<EOF |
| 157 | + MACHINE = "${{ matrix.machine }}" |
| 158 | + BB_NUMBER_THREADS = "2" |
| 159 | + PARALLEL_MAKE = "-j 2" |
| 160 | + CONF_VERSION = "2" |
| 161 | + EOF |
| 162 | + bitbake-layers add-layer "$GITHUB_WORKSPACE/meta-vscode" |
| 163 | + bitbake-layers show-layers |
| 164 | + bitbake -p |
| 165 | +
|
| 166 | + - name: Fetch vscode (MACHINE=${{ matrix.machine }}) |
| 167 | + env: |
| 168 | + LANG: en_US.UTF-8 |
| 169 | + LC_ALL: en_US.UTF-8 |
| 170 | + run: | |
| 171 | + set -eo pipefail |
| 172 | + cd oe-core |
| 173 | + source oe-init-build-env build |
| 174 | + bitbake -c fetch vscode |
| 175 | +
|
| 176 | + # Build vscode end-to-end on the LTS we care most about today |
| 177 | + # (scarthgap). This catches QA failures (libdir, file-rdeps, etc.) |
| 178 | + # that bitbake -p doesn't run. Single arch (x86_64) for cost; the |
| 179 | + # parse matrix above still proves the other arches' URLs resolve. |
| 180 | + build: |
| 181 | + name: build vscode (scarthgap / qemux86-64) |
| 182 | + runs-on: ubuntu-22.04 |
| 183 | + steps: |
| 184 | + - uses: actions/checkout@v4 |
| 185 | + with: |
| 186 | + path: meta-vscode |
| 187 | + |
| 188 | + - name: Free disk space |
| 189 | + run: | |
| 190 | + sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc \ |
| 191 | + /opt/hostedtoolcache/CodeQL /usr/local/share/boost \ |
| 192 | + "$AGENT_TOOLSDIRECTORY" |
| 193 | +
|
| 194 | + - name: Clone poky (scarthgap) |
| 195 | + run: git clone --depth 1 --branch scarthgap https://git.yoctoproject.org/poky poky |
| 196 | + |
| 197 | + - name: Install Yocto host dependencies |
| 198 | + run: | |
| 199 | + sudo apt-get update |
| 200 | + sudo apt-get install -y --no-install-recommends \ |
| 201 | + gawk wget git diffstat unzip texinfo gcc build-essential chrpath \ |
| 202 | + socat cpio python3 python3-pip python3-pexpect xz-utils debianutils \ |
| 203 | + iputils-ping python3-git python3-jinja2 python3-subunit zstd liblz4-tool \ |
| 204 | + file locales libacl1 |
| 205 | + sudo locale-gen en_US.UTF-8 |
| 206 | +
|
| 207 | + - name: Build vscode |
| 208 | + env: |
| 209 | + LANG: en_US.UTF-8 |
| 210 | + LC_ALL: en_US.UTF-8 |
| 211 | + run: | |
| 212 | + set -eo pipefail |
| 213 | + cd poky |
| 214 | + source oe-init-build-env build |
| 215 | + cat >> conf/local.conf <<'EOF' |
| 216 | + MACHINE = "qemux86-64" |
| 217 | + BB_NUMBER_THREADS = "2" |
| 218 | + PARALLEL_MAKE = "-j 2" |
| 219 | + INHERIT += "rm_work" |
| 220 | + CONF_VERSION = "2" |
| 221 | + EOF |
| 222 | + bitbake-layers add-layer "$GITHUB_WORKSPACE/meta-vscode" |
| 223 | + bitbake vscode |
0 commit comments