Skip to content

Commit 1a4b9bf

Browse files
Merge pull request #12 from PADL/release/6.1_separate_commits
Proposal for scarthgap branch (Swift 6.1.2) -- No squash
2 parents b2a0d64 + 55501be commit 1a4b9bf

File tree

52 files changed

+1347
-983
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1347
-983
lines changed

.devcontainer/Dockerfile

Lines changed: 0 additions & 10 deletions
This file was deleted.

.devcontainer/devcontainer.json

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 96 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,100 @@
1-
name: Build
1+
name: build
22

3-
on: [push]
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
47

58
jobs:
9+
yocto-aarch64:
10+
runs-on: ubuntu-24.04
11+
container:
12+
steps:
13+
- name: Packages
14+
run: |
15+
sudo apt-get update
16+
sudo apt install -y build-essential chrpath cpio debianutils diffstat file gawk gcc git iputils-ping libacl1 liblz4-tool locales python3 python3-git python3-jinja2 python3-pexpect python3-pip python3-subunit socat texinfo unzip wget xz-utils zstd
17+
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
18+
- name: Checkout Poky
19+
uses: actions/checkout@v4
20+
with:
21+
repository: yoctoproject/poky
22+
path: poky
23+
ref: scarthgap
24+
fetch_depth: 0
25+
- name: Checkout Swift layer
26+
uses: actions/checkout@v4
27+
with:
28+
path: poky/meta-swift
29+
fetch_depth: 0
30+
- name: Build
31+
run: |
32+
cd $GITHUB_WORKSPACE/poky
33+
source oe-init-build-env
34+
bitbake-layers add-layer ../meta-swift
35+
rm -f conf/local.conf
36+
echo 'MACHINE = "qemuarm64"' > conf/local.conf
37+
echo 'INHERIT += "rm_work"' >> conf/local.conf
38+
bitbake swift-hello-world
639
7-
build:
8-
name: Build
9-
runs-on: ubuntu-latest
10-
container: colemancda/meta-swift
11-
strategy:
12-
matrix:
13-
machine: [beaglebone-yocto, qemuarm64]
14-
steps:
15-
- name: Checkout
16-
uses: actions/checkout@v3
17-
- name: Build
18-
run: |
19-
export SRC_ROOT=$GITHUB_WORKSPACE
20-
export POKY_DIR=/tmp/poky
21-
export MACHINE=${{ matrix.machine }}
22-
cd /tmp/
23-
git clone --branch dunfell-23.0.20-cmake-3.22.3 https://github.com/MillerTechnologyPeru/poky.git
24-
cd $SRC_ROOT
25-
./build.sh
40+
yocto-armv7:
41+
runs-on: ubuntu-24.04
42+
container:
43+
steps:
44+
- name: Packages
45+
run: |
46+
sudo apt-get update
47+
sudo apt install -y build-essential chrpath cpio debianutils diffstat file gawk gcc git iputils-ping libacl1 liblz4-tool locales python3 python3-git python3-jinja2 python3-pexpect python3-pip python3-subunit socat texinfo unzip wget xz-utils zstd
48+
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
49+
- name: Checkout Poky
50+
uses: actions/checkout@v4
51+
with:
52+
repository: yoctoproject/poky
53+
path: poky
54+
ref: scarthgap
55+
fetch_depth: 0
56+
- name: Checkout Swift layer
57+
uses: actions/checkout@v4
58+
with:
59+
path: poky/meta-swift
60+
fetch_depth: 0
61+
- name: Build
62+
run: |
63+
cd $GITHUB_WORKSPACE/poky
64+
source oe-init-build-env
65+
bitbake-layers add-layer ../meta-swift
66+
rm -f conf/local.conf
67+
echo 'MACHINE = "qemuarm"' > conf/local.conf
68+
echo 'INHERIT += "rm_work"' >> conf/local.conf
69+
bitbake swift-hello-world
70+
71+
yocto-x86_64:
72+
runs-on: ubuntu-24.04
73+
container:
74+
steps:
75+
- name: Packages
76+
run: |
77+
sudo apt-get update
78+
sudo apt install -y build-essential chrpath cpio debianutils diffstat file gawk gcc git iputils-ping libacl1 liblz4-tool locales python3 python3-git python3-jinja2 python3-pexpect python3-pip python3-subunit socat texinfo unzip wget xz-utils zstd
79+
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
80+
- name: Checkout Poky
81+
uses: actions/checkout@v4
82+
with:
83+
repository: yoctoproject/poky
84+
path: poky
85+
ref: scarthgap
86+
fetch_depth: 0
87+
- name: Checkout Swift layer
88+
uses: actions/checkout@v4
89+
with:
90+
path: poky/meta-swift
91+
fetch_depth: 0
92+
- name: Build
93+
run: |
94+
cd $GITHUB_WORKSPACE/poky
95+
source oe-init-build-env
96+
bitbake-layers add-layer ../meta-swift
97+
rm -f conf/local.conf
98+
echo 'MACHINE = "qemux86-64"' > conf/local.conf
99+
echo 'INHERIT += "rm_work"' >> conf/local.conf
100+
bitbake swift-hello-world

.gitlab-ci.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
# meta-swift
2-
Yocto meta-layer for swift-on-arm (Swift 5.7.1)
2+
3+
Yocto layer for the Swift programming language.
34

45
# Usage
56

6-
Add this meta layer to your project (refer to yocto user manual)
7+
Add this layer to your project (refer to Yocto user manual, or use `bitbake-layers add-layer`).
78

8-
Create a new swift application and include it in your yocto build as follows...
9+
Create a new Swift application and include it in your build as follows:
910

1011
```
11-
DESCRIPTION = "My swift 5.7.1 app"
12+
DESCRIPTION = "My Swift app"
1213
LICENSE = "CLOSED"
1314
1415
SRC_URI = "file://Sources/hello-world/main.swift \
@@ -18,14 +19,14 @@ SRC_URI = "file://Sources/hello-world/main.swift \
1819
inherit swift
1920
```
2021

21-
This does a few things, when you `inherit swift` meta-layer class, it will does the following...
22+
When you `inherit swift` class, it does the following:
2223

23-
- Automatically download the x86_64 and ARMv7 swift 5.7.1 binaries and create a cross-compiling sys-root
24-
- Add an RDEPENDS_${PN} for `swift` which is the Armv7 runtime
24+
- Automatically download the x86\_64 SDK binaries and create a cross-compiling sysroot
25+
- Add an RDEPENDS:${PN} for `swift`
2526
- Performs the required build steps
2627

2728
# Deployment
2829

29-
The user of this meta-layer must provide their own `do_install` function.
30+
The user of this layer must provide their own `do_install` function.
3031

31-
The finished binaries are located in ${WORKDIR}/.build/release/*
32+
The finished binaries are located in ${BUILD\_DIR}.

build.sh

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)