forked from jeremy-prater/meta-swift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/ci' into 'trunk'
Added GitLab CI See merge request racepointenergy/linux/meta-swift!13
- Loading branch information
Showing
5 changed files
with
108 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/ubuntu/.devcontainer/base.Dockerfile | ||
|
||
# [Choice] Ubuntu version (use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon): ubuntu-22.04, ubuntu-20.04, ubuntu-18.04 | ||
ARG VARIANT="ubuntu-20.04" | ||
FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT} | ||
|
||
# Install BitBake dependencies | ||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
&& apt-get -y install --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 libegl1-mesa libsdl1.2-dev xterm python3-subunit mesa-common-dev zstd liblz4-tool file | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: | ||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/ubuntu | ||
{ | ||
"name": "Ubuntu", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
// Update 'VARIANT' to pick an Ubuntu version: jammy / ubuntu-22.04, focal / ubuntu-20.04, bionic /ubuntu-18.04 | ||
// Use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon. | ||
"args": { "VARIANT": "ubuntu-20.04" } | ||
}, | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
// "postCreateCommand": "uname -a", | ||
|
||
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. | ||
"remoteUser": "vscode" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Build | ||
|
||
on: [push] | ||
|
||
jobs: | ||
|
||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
container: colemancda/meta-swift | ||
strategy: | ||
matrix: | ||
machine: [beaglebone-yocto, qemuarm64] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Build | ||
run: | | ||
export SRC_ROOT=$GITHUB_WORKSPACE | ||
export POKY_DIR=/tmp/poky | ||
export MACHINE=${{ matrix.machine }} | ||
cd /tmp/ | ||
git clone --branch dunfell-23.0.20-cmake-3.22.3 https://github.com/MillerTechnologyPeru/poky.git | ||
cd $SRC_ROOT | ||
./build.sh |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
stages: | ||
- build | ||
|
||
build-armv7: | ||
image: colemancda/meta-swift | ||
stage: build | ||
script: | ||
- export SRC_ROOT=$(pwd) | ||
- export MACHINE=beaglebone-yocto | ||
- export POKY_DIR=/tmp/poky | ||
- cd /tmp/ | ||
- git clone --branch dunfell-23.0.20-cmake-3.22.3 https://github.com/MillerTechnologyPeru/poky.git | ||
- cd $SRC_ROOT | ||
- ./build.sh | ||
tags: | ||
- bastion-c5d.9xl | ||
|
||
build-arm64: | ||
image: colemancda/meta-swift | ||
stage: build | ||
script: | ||
- export SRC_ROOT=$(pwd) | ||
- export MACHINE=qemuarm64 | ||
- export POKY_DIR=/tmp/poky | ||
- cd /tmp/ | ||
- git clone --branch dunfell-23.0.20-cmake-3.22.3 https://github.com/MillerTechnologyPeru/poky.git | ||
- cd $SRC_ROOT | ||
- ./build.sh | ||
tags: | ||
- bastion-c5d.9xl |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Configuration | ||
SRC_ROOT="${SRC_ROOT:=$(pwd)}" | ||
POKY_DIR="${POKY_DIR:=$SRC_ROOT/../poky}" | ||
MACHINE="${MACHINE:=beaglebone-yocto}" | ||
|
||
# Build Yocto Poky | ||
cd $POKY_DIR | ||
source oe-init-build-env | ||
bitbake-layers add-layer $SRC_ROOT | ||
# Customize build | ||
touch conf/sanity.conf | ||
CONF_FILE=./conf/local.conf | ||
rm -rf $CONF_FILE | ||
echo "# Swift for Yocto" >> $CONF_FILE | ||
echo "MACHINE=\"${MACHINE}\"" >> $CONF_FILE | ||
#echo 'SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/all/PATH;downloadfilename=PATH"' >> $CONF_FILE | ||
#echo "USER_CLASSES += \"buildstats buildstats-summary\"" >> $CONF_FILE | ||
|
||
# build Swift | ||
bitbake swift-hello-world |