Skip to content

ci

ci #59

Workflow file for this run

name: ci
on:
push:
branches: [main, master]
pull_request:
workflow_dispatch:
# Daily run picks up oe-core / bitbake master drift even when no
# change to this repo has fired CI.
schedule:
- cron: '23 5 * * *'
# Cancel superseded runs for the same ref to save CI minutes.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
parse:
# poky-the-distro covers up to walnascar; whinlatter+ no longer
# publish a poky combo repo and are handled by parse-oe-core below.
name: parse (${{ matrix.poky_branch }} / ${{ matrix.machine }})
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
poky_branch: [kirkstone, scarthgap, styhead, walnascar]
# MACHINE controls which Microsoft binary tarball the recipe
# resolves to:
# qemux86-64 -> linux-x64
# qemuarm64 -> linux-arm64
# qemuarm -> linux-armhf
machine: [qemux86-64, qemuarm64, qemuarm]
steps:
- uses: actions/checkout@v4
with:
path: meta-vscode
- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc \
/opt/hostedtoolcache/CodeQL /usr/local/share/boost \
"$AGENT_TOOLSDIRECTORY"
- name: Cache poky checkout
uses: actions/cache@v4
with:
path: poky
key: poky-${{ matrix.poky_branch }}-v1
restore-keys: poky-${{ matrix.poky_branch }}-
- name: Clone poky
run: |
# When the cache restores an older poky and upstream has since
# rebased the release branch (scarthgap has done this), a plain
# `fetch ... ref:remote-ref` refuses the non-fast-forward update
# and the job dies before bitbake even starts. Force-refspec
# (`+ref`) makes the fetch overwrite the local tracking ref;
# any harder breakage (corrupt cache, repository moved) falls
# back to a clean re-clone.
set -eo pipefail
clone_fresh() {
rm -rf poky
git clone --depth 1 --branch ${{ matrix.poky_branch }} \
https://git.yoctoproject.org/poky poky
}
if [ ! -d poky/.git ]; then
clone_fresh
else
if ! git -C poky fetch --depth 1 origin \
"+${{ matrix.poky_branch }}:refs/remotes/origin/${{ matrix.poky_branch }}"; then
echo "fetch failed; falling back to fresh clone"
clone_fresh
else
git -C poky checkout -B ${{ matrix.poky_branch }} \
refs/remotes/origin/${{ matrix.poky_branch }}
fi
fi
- name: Install Yocto host dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
gawk wget git diffstat unzip texinfo gcc build-essential chrpath \
socat cpio python3 python3-pip python3-pexpect xz-utils debianutils \
iputils-ping python3-git python3-jinja2 python3-subunit zstd liblz4-tool \
file locales libacl1
sudo locale-gen en_US.UTF-8
- name: Parse the layer (MACHINE=${{ matrix.machine }})
env:
LANG: en_US.UTF-8
LC_ALL: en_US.UTF-8
run: |
set -eo pipefail
cd poky
source oe-init-build-env build
cat >> conf/local.conf <<EOF
MACHINE = "${{ matrix.machine }}"
BB_NUMBER_THREADS = "2"
PARALLEL_MAKE = "-j 2"
CONF_VERSION = "2"
EOF
bitbake-layers add-layer "$GITHUB_WORKSPACE/meta-vscode"
bitbake-layers show-layers
bitbake -p
- name: Fetch vscode (MACHINE=${{ matrix.machine }})
env:
LANG: en_US.UTF-8
LC_ALL: en_US.UTF-8
run: |
set -eo pipefail
cd poky
source oe-init-build-env build
bitbake -c fetch vscode
parse-oe-core:
# whinlatter and wrynose dropped the combined poky repository, so
# we clone openembedded-core + bitbake separately.
name: parse (${{ matrix.release }} / ${{ matrix.machine }})
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
release: [whinlatter, wrynose]
machine: [qemux86-64, qemuarm64, qemuarm]
# include adds the bitbake-version axis as a value-mapping
# against an existing matrix axis (release); GHA pairs the
# extra key (bitbake) with each existing combo that shares the
# release value.
include:
- release: whinlatter
bitbake: '2.16'
- release: wrynose
bitbake: '2.18'
steps:
- uses: actions/checkout@v4
with:
path: meta-vscode
- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc \
/opt/hostedtoolcache/CodeQL /usr/local/share/boost \
"$AGENT_TOOLSDIRECTORY"
- name: Clone oe-core (${{ matrix.release }})
run: |
git clone --depth 1 --branch ${{ matrix.release }} \
https://git.openembedded.org/openembedded-core oe-core
- name: Clone bitbake (${{ matrix.bitbake }})
run: |
git clone --depth 1 --branch ${{ matrix.bitbake }} \
https://git.openembedded.org/bitbake oe-core/bitbake
- name: Install Yocto host dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
gawk wget git diffstat unzip texinfo gcc build-essential chrpath \
socat cpio python3 python3-pip python3-pexpect xz-utils debianutils \
iputils-ping python3-git python3-jinja2 python3-subunit zstd liblz4-tool \
file locales libacl1
sudo locale-gen en_US.UTF-8
- name: Parse the layer (MACHINE=${{ matrix.machine }})
env:
LANG: en_US.UTF-8
LC_ALL: en_US.UTF-8
run: |
set -eo pipefail
cd oe-core
source oe-init-build-env build
cat >> conf/local.conf <<EOF
MACHINE = "${{ matrix.machine }}"
BB_NUMBER_THREADS = "2"
PARALLEL_MAKE = "-j 2"
CONF_VERSION = "2"
EOF
bitbake-layers add-layer "$GITHUB_WORKSPACE/meta-vscode"
bitbake-layers show-layers
bitbake -p
- name: Fetch vscode (MACHINE=${{ matrix.machine }})
env:
LANG: en_US.UTF-8
LC_ALL: en_US.UTF-8
run: |
set -eo pipefail
cd oe-core
source oe-init-build-env build
bitbake -c fetch vscode
# Track oe-core / bitbake master for early warning on bitbake API
# drift, new QA checks, layer.conf format changes, etc. This job is
# informational (continue-on-error) so a hot bitbake-master breakage
# doesn't block merges; the value is the alert, not the gate.
parse-oe-core-master:
name: parse (oe-core master / ${{ matrix.machine }}) [informational]
runs-on: ubuntu-22.04
continue-on-error: true
strategy:
fail-fast: false
matrix:
machine: [qemux86-64, qemuarm64, qemuarm]
steps:
- uses: actions/checkout@v4
with:
path: meta-vscode
- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc \
/opt/hostedtoolcache/CodeQL /usr/local/share/boost \
"$AGENT_TOOLSDIRECTORY"
- name: Clone oe-core (master)
run: |
git clone --depth 1 --branch master \
https://git.openembedded.org/openembedded-core oe-core
- name: Clone bitbake (master)
run: |
git clone --depth 1 --branch master \
https://git.openembedded.org/bitbake oe-core/bitbake
- name: Install Yocto host dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
gawk wget git diffstat unzip texinfo gcc build-essential chrpath \
socat cpio python3 python3-pip python3-pexpect xz-utils debianutils \
iputils-ping python3-git python3-jinja2 python3-subunit zstd liblz4-tool \
file locales libacl1
sudo locale-gen en_US.UTF-8
- name: Parse the layer (MACHINE=${{ matrix.machine }})
env:
LANG: en_US.UTF-8
LC_ALL: en_US.UTF-8
run: |
set -eo pipefail
cd oe-core
source oe-init-build-env build
cat >> conf/local.conf <<EOF
MACHINE = "${{ matrix.machine }}"
BB_NUMBER_THREADS = "2"
PARALLEL_MAKE = "-j 2"
CONF_VERSION = "2"
EOF
bitbake-layers add-layer "$GITHUB_WORKSPACE/meta-vscode"
bitbake-layers show-layers
bitbake -p
- name: Fetch vscode (MACHINE=${{ matrix.machine }})
env:
LANG: en_US.UTF-8
LC_ALL: en_US.UTF-8
run: |
set -eo pipefail
cd oe-core
source oe-init-build-env build
bitbake -c fetch vscode
# Build vscode end-to-end on the LTS we care most about today
# (scarthgap). This catches QA failures (libdir, file-rdeps, etc.)
# that bitbake -p doesn't run. Single arch (x86_64) for cost; the
# parse matrix above still proves the other arches' URLs resolve.
build:
name: build vscode (scarthgap / qemux86-64)
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
path: meta-vscode
- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc \
/opt/hostedtoolcache/CodeQL /usr/local/share/boost \
"$AGENT_TOOLSDIRECTORY"
- name: Clone poky (scarthgap)
run: git clone --depth 1 --branch scarthgap https://git.yoctoproject.org/poky poky
- name: Install Yocto host dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
gawk wget git diffstat unzip texinfo gcc build-essential chrpath \
socat cpio python3 python3-pip python3-pexpect xz-utils debianutils \
iputils-ping python3-git python3-jinja2 python3-subunit zstd liblz4-tool \
file locales libacl1
sudo locale-gen en_US.UTF-8
- name: Build vscode
env:
LANG: en_US.UTF-8
LC_ALL: en_US.UTF-8
run: |
set -eo pipefail
cd poky
source oe-init-build-env build
cat >> conf/local.conf <<'EOF'
MACHINE = "qemux86-64"
BB_NUMBER_THREADS = "2"
PARALLEL_MAKE = "-j 2"
INHERIT += "rm_work"
CONF_VERSION = "2"
EOF
bitbake-layers add-layer "$GITHUB_WORKSPACE/meta-vscode"
bitbake vscode