Merge pull request #48 from lucimber/pr-main-fix-override #52
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Bitbake (main) | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
strategy: | |
matrix: | |
recipe: [openjdk-8-jre, openjdk-11-jre, openjdk-17-jre, openjdk-21-jre] | |
machine: [qemuarm, qemuarm64, qemuriscv64, qemux86-64] | |
exclude: | |
- recipe: openjdk-8-jre | |
machine: qemuriscv64 | |
- recipe: openjdk-11-jre | |
machine: qemuriscv64 | |
- recipe: openjdk-21-jre | |
machine: qemuarm | |
max-parallel: 3 | |
fail-fast: false | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Install software required by OpenEmbedded / Yocto | |
run: | | |
sudo apt-get update | |
sudo apt-get install 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: Checkout OE-Core | |
uses: actions/checkout@v4 | |
with: | |
repository: openembedded/openembedded-core | |
ref: scarthgap | |
path: oe-core | |
- name: Checkout Bitbake | |
uses: actions/checkout@v4 | |
with: | |
repository: openembedded/bitbake | |
ref: '2.8' | |
path: oe-core/bitbake | |
- name: Checkout sources of this project | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
path: oe-core/meta-openjdk-temurin | |
- name: Replace config of build-environment | |
run: | | |
cd oe-core | |
source oe-init-build-env build > /dev/null 2>&1 | |
mv -v ../meta-openjdk-temurin/.github/workflows/bitbake-main-local.conf \ | |
conf/local.conf | |
- name: Add layer to build-environment | |
run: | | |
cd oe-core | |
source oe-init-build-env build > /dev/null 2>&1 | |
bitbake-layers add-layer ../meta-openjdk-temurin | |
- name: Restore cached sstate of Bitbake | |
id: cache-bitbake-sstate-restore | |
uses: actions/cache/restore@v4 | |
with: | |
path: oe-core/build/sstate-cache | |
key: bitbake-sstate_main_${{ matrix.machine }} | |
- name: Build ${{ matrix.recipe }} with Bitbake | |
run: | | |
cd oe-core | |
source oe-init-build-env build > /dev/null 2>&1 | |
MACHINE=${{ matrix.machine }} bitbake ${{ matrix.recipe }} | |
- name: Save sstate of Bitbake | |
id: cache-bitbake-sstate-save | |
if: steps.cache-bitbake-sstate-restore.outputs.cache-hit != 'true' | |
uses: actions/cache/save@v4 | |
with: | |
path: oe-core/build/sstate-cache | |
key: ${{ steps.cache-bitbake-sstate-restore.outputs.cache-primary-key }} |