Skip to content

codeql: removing the coding-standard repo #428

codeql: removing the coding-standard repo

codeql: removing the coding-standard repo #428

# *******************************************************************************
# Copyright (c) 2025 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
name: AutoSD - Build & Integration Test
on:
pull_request:
types: [opened, reopened, synchronize]
merge_group:
types: [checks_requested]
push:
branches:
- main
# Do not flood CI with unneeded previous runs in PR
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: ${{ github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') }}
jobs:
build:
name: x86_64
runs-on: ubuntu-latest
env:
AIB_SCRIPT_URL: https://gitlab.com/CentOS/automotive/src/automotive-image-builder/-/raw/main/auto-image-builder.sh?ref_type=heads
AIB_CONTAINER_IMAGE: quay.io/centos-sig-automotive/automotive-image-builder:latest
steps:
- name: Clean disk space
uses: eclipse-score/more-disk-space@v1
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.18.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}
repository-cache: true
cache-save: ${{ github.event_name == 'push' }}
- name: Install System Dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y podman curl qemu-system createrepo-c
- name: Build Showcases
run: |
bazel build --lockfile_mode=error --config autosd-x86_64 //images/autosd_x86_64:score-showcases
- name: Copy showcases folder
run: |
set -e
ls ./bazel-bin/showcases/showcases/showcases
cp -R ./bazel-bin/showcases/showcases/showcases ./images/autosd_x86_64/build/files/reference_integration/
- name: Install AIB Tools
run: |
curl -o auto-image-builder.sh "$AIB_SCRIPT_URL"
chmod +x auto-image-builder.sh
working-directory: ./images/autosd_x86_64/build
- name: Build AutoSD QEMU (x86_64)
run: |
export AIB_LOCAL_CONTAINER_STORAGE=$PWD/_build/containers-storage
mkdir -p _build/containers-storage
sudo -E ./auto-image-builder.sh -c $AIB_CONTAINER_IMAGE build-builder --distro=autosd10-sig
sudo -E ./auto-image-builder.sh -c $AIB_CONTAINER_IMAGE --verbose build \
--distro=autosd10-sig \
--target=qemu \
--define-file vars.yml \
--define-file vars-devel.yml \
image.aib.yml \
localhost/score:latest
sudo -E ./auto-image-builder.sh -c $AIB_CONTAINER_IMAGE --verbose to-disk-image localhost/score:latest _build/disk.qcow2
sudo chown $(id -u):$(id -u) _build/disk.qcow2
working-directory: ./images/autosd_x86_64/build
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Test QEMU image
run: |
sshcmd() {
sshpass -p "$SSH_PASSWORD" ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p 2222 root@localhost $@
}
./scripts/run_qemu
sshcmd 'cat /etc/os-release'
working-directory: ./images/autosd_x86_64/build
env:
SSH_PASSWORD: password
- name: Archive QEMU disk image (x86_64)
uses: actions/upload-artifact@v4
with:
name: autosd10-score-reference_integration-x86_64.qcow2
path: images/autosd_x86_64/build/_build/disk.qcow2