File tree Expand file tree Collapse file tree 8 files changed +67
-60
lines changed Expand file tree Collapse file tree 8 files changed +67
-60
lines changed Original file line number Diff line number Diff line change
1
+ name : ' Install Swift'
2
+ description : ' Installs the Swift specified by a .swift-version file'
3
+
4
+ runs :
5
+ using : " composite"
6
+ steps :
7
+ - name : Install apt dependencies
8
+ shell : bash
9
+ run : |
10
+ SUDO=$(if [[ $EUID -ne 0 ]]; then echo sudo; fi)
11
+ $SUDO apt-get -qq update
12
+ $SUDO apt-get -qq -y install curl gpg binutils git unzip gnupg2 \
13
+ libc6-dev libcurl4-openssl-dev libedit2 libgcc-13-dev libpython3-dev \
14
+ libstdc++-13-dev libxml2-dev libncurses-dev libz3-dev pkg-config \
15
+ tzdata zlib1g-dev
16
+ env :
17
+ DEBIAN_FRONTEND : noninteractive
18
+
19
+ - name : Install Swiftly
20
+ shell : bash
21
+ run : |
22
+ UNAME=$(uname -m)
23
+
24
+ export SWIFTLY_HOME_DIR="$HOME/.local/share/swiftly"
25
+ echo "SWIFTLY_HOME_DIR=$SWIFTLY_HOME_DIR" >> $GITHUB_ENV
26
+ echo "SWIFTLY_HOME_DIR=$SWIFTLY_HOME_DIR" >> $HOME/.bashrc
27
+
28
+ export SWIFTLY_BIN_DIR="$HOME/.local/share/swiftly/bin"
29
+ echo "SWIFTLY_BIN_DIR=$SWIFTLY_BIN_DIR" >> $GITHUB_ENV
30
+ echo "SWIFTLY_BIN_DIR=$SWIFTLY_BIN_DIR" >> $HOME/.bashrc
31
+
32
+ curl -O "https://download.swift.org/swiftly/linux/swiftly-$UNAME.tar.gz"
33
+ tar zxf "swiftly-$UNAME.tar.gz"
34
+ ./swiftly init --skip-install --assume-yes --quiet-shell-followup
35
+
36
+ echo "PATH=$SWIFTLY_BIN_DIR:$PATH" >> $GITHUB_ENV
37
+ echo "PATH=\$SWIFTLY_BIN_DIR:\$PATH" >> $HOME/.bashrc
38
+
39
+ - name : Install Swift
40
+ shell : bash
41
+ run : |
42
+ swiftly install
43
+ swift --version
Original file line number Diff line number Diff line change @@ -13,11 +13,11 @@ jobs:
13
13
build-esp :
14
14
runs-on : ubuntu-24.04
15
15
container : espressif/idf:latest
16
+
16
17
strategy :
17
18
fail-fast : false
18
19
matrix :
19
20
example : [esp32-led-blink-sdk, esp32-led-strip-sdk]
20
- swift : [swift-DEVELOPMENT-SNAPSHOT-2024-12-04-a]
21
21
22
22
steps :
23
23
- name : Checkout repo
26
26
- name : Install apt dependencies
27
27
run : apt-get -qq update && apt-get -qq -y install pkg-config
28
28
29
- - name : Install ${{ matrix.swift }}
30
- run : |
31
- wget -q https://download.swift.org/development/ubuntu2404/${{ matrix.swift }}/${{ matrix.swift }}-ubuntu24.04.tar.gz
32
- tar xzf ${{ matrix.swift }}-ubuntu24.04.tar.gz
33
- export PATH="`pwd`/${{ matrix.swift }}-ubuntu24.04/usr/bin/:$PATH"
34
- echo "PATH=$PATH" >> $GITHUB_ENV
35
- swiftc --version
29
+ - name : Install Swift
30
+ uses : ./.github/actions/install-swift
36
31
37
32
- name : Build ${{ matrix.example }}
38
33
run : |
Original file line number Diff line number Diff line change 17
17
fail-fast : false
18
18
matrix :
19
19
example : [nuttx-riscv-blink]
20
- swift : [swift-DEVELOPMENT-SNAPSHOT-2024-12-22-a]
21
20
22
21
steps :
23
22
- name : Checkout repo
@@ -50,18 +49,11 @@ jobs:
50
49
echo "PATH=$PATH" >> $GITHUB_ENV
51
50
riscv-none-elf-gcc --version
52
51
53
- - name : Install ${{ matrix.swift }}
54
- run : |
55
- wget -q https://download.swift.org/development/ubuntu2404/${{ matrix.swift }}/${{ matrix.swift }}-ubuntu24.04.tar.gz
56
- tar xzf ${{ matrix.swift }}-ubuntu24.04.tar.gz
57
- export PATH="`pwd`/${{ matrix.swift }}-ubuntu24.04/usr/bin/:$PATH"
58
- echo "PATH=$PATH" >> $GITHUB_ENV
59
- swiftc --version
60
-
61
- - name : Config ${{ matrix.example }}
62
- working-directory : ${{ matrix.example }}
63
- run : cmake -B build -GNinja -DBOARD_CONFIG=rv-virt:leds_swift -DENABLE_NUTTX_TRACE=ON
52
+ - name : Install Swift
53
+ uses : ./.github/actions/install-swift
64
54
65
55
- name : Build ${{ matrix.example }}
66
56
working-directory : ${{ matrix.example }}
67
- run : cmake --build build
57
+ run : |
58
+ cmake -B build -GNinja -DBOARD_CONFIG=rv-virt:leds_swift -DENABLE_NUTTX_TRACE=ON
59
+ cmake --build build
Original file line number Diff line number Diff line change 12
12
jobs :
13
13
build-pico-sdk :
14
14
runs-on : ubuntu-24.04
15
+
15
16
strategy :
16
17
fail-fast : false
17
18
matrix :
22
23
board : pico_w
23
24
- name : harmony
24
25
board : pico_w
25
- swift : [swift-DEVELOPMENT-SNAPSHOT-2024-12-04-a]
26
26
27
27
steps :
28
28
- name : Checkout repo
46
46
curl -sL https://developer.arm.com/-/media/Files/downloads/gnu/14.2.rel1/binrel/arm-gnu-toolchain-14.2.rel1-$ARCH-arm-none-eabi.tar.xz -O
47
47
tar xf arm-gnu-toolchain-14.2.rel1-$ARCH-arm-none-eabi.tar.xz
48
48
49
- - name : Install ${{ matrix.swift }}
50
- run : |
51
- wget -q https://download.swift.org/development/ubuntu2404/${{ matrix.swift }}/${{ matrix.swift }}-ubuntu24.04.tar.gz
52
- tar xzf ${{ matrix.swift }}-ubuntu24.04.tar.gz
53
- export PATH="`pwd`/${{ matrix.swift }}-ubuntu24.04/usr/bin/:$PATH"
54
- echo "PATH=$PATH" >> $GITHUB_ENV
55
- which swiftc
56
- swiftc --version
49
+ - name : Install Swift
50
+ uses : ./.github/actions/install-swift
57
51
58
52
- name : Clone Pico SDK
59
53
run : |
78
72
echo "PICO_TOOLCHAIN_PATH=`pwd`/arm-gnu-toolchain-14.2.rel1-$ARCH-arm-none-eabi" >> $GITHUB_ENV
79
73
80
74
- name : Build ${{ matrix.example.name }}
75
+ working-directory : ${{ matrix.example.name }}
81
76
run : |
82
- cd ${{ matrix.example.name }}
83
77
cmake -B build -G Ninja .
84
78
cmake --build build
Original file line number Diff line number Diff line change 8
8
schedule :
9
9
# Build on Mondays at 9am PST every week
10
10
- cron : ' 0 17 * * 1'
11
+
11
12
jobs :
12
13
build-rpi-baremetal :
13
14
runs-on : ubuntu-24.04
15
+
14
16
strategy :
15
17
fail-fast : false
16
18
matrix :
17
- example : [rpi5-blink, rpi4b-blink]
18
- swift : [swift-DEVELOPMENT-SNAPSHOT-2024-12-04-a]
19
+ example : [rpi4b-blink, rpi5-blink]
19
20
20
21
steps :
21
22
- name : Checkout repo
24
25
- name : Install apt dependencies
25
26
run : sudo apt-get -qq update && sudo apt-get -qq -y install make llvm
26
27
27
- - name : Install ${{ matrix.swift }}
28
- run : |
29
- wget -q https://download.swift.org/development/ubuntu2404/${{ matrix.swift }}/${{ matrix.swift }}-ubuntu24.04.tar.gz
30
- tar xzf ${{ matrix.swift }}-ubuntu24.04.tar.gz
31
- export PATH="`pwd`/${{ matrix.swift }}-ubuntu24.04/usr/bin/:$PATH"
32
- echo "PATH=$PATH" >> $GITHUB_ENV
33
- which swiftc
34
- swiftc --version
28
+ - name : Install Swift
29
+ uses : ./.github/actions/install-swift
35
30
36
31
- name : Build ${{ matrix.example }}
37
- run : |
38
- cd ${{ matrix.example }}
39
- make
32
+ working-directory : ${{ matrix.example }}
33
+ run : make
Original file line number Diff line number Diff line change 17
17
fail-fast : false
18
18
matrix :
19
19
example : [stm32-blink]
20
- swift : [swift-DEVELOPMENT-SNAPSHOT-2025-03-04-a]
21
20
22
21
steps :
23
22
- name : Checkout repo
31
30
- name : Install uv
32
31
uses : astral-sh/setup-uv@v5
33
32
34
- - name : Install ${{ matrix.swift }}
35
- run : |
36
- wget -q https://download.swift.org/development/ubuntu2404/${{ matrix.swift }}/${{ matrix.swift }}-ubuntu24.04.tar.gz
37
- tar xzf ${{ matrix.swift }}-ubuntu24.04.tar.gz
38
- export PATH="`pwd`/${{ matrix.swift }}-ubuntu24.04/usr/bin/:$PATH"
39
- echo "PATH=$PATH" >> $GITHUB_ENV
40
- swiftc --version
33
+ - name : Install Swift
34
+ uses : ./.github/actions/install-swift
41
35
42
36
- name : Build ${{ matrix.example }}
43
37
working-directory : ${{ matrix.example }}
Original file line number Diff line number Diff line change 17
17
fail-fast : false
18
18
matrix :
19
19
example : [nrfx-blink-sdk]
20
- swift : [swift-DEVELOPMENT-SNAPSHOT-2024-12-04-a]
21
20
22
21
steps :
23
22
- name : Checkout repo
34
33
app-path : ${{ matrix.example }}
35
34
toolchains : arm-zephyr-eabi
36
35
37
- - name : Install ${{ matrix.swift }}
38
- run : |
39
- wget -q https://download.swift.org/development/ubuntu2404/${{ matrix.swift }}/${{ matrix.swift }}-ubuntu24.04.tar.gz
40
- tar xzf ${{ matrix.swift }}-ubuntu24.04.tar.gz
41
- export PATH="`pwd`/${{ matrix.swift }}-ubuntu24.04/usr/bin/:$PATH"
42
- echo "PATH=$PATH" >> $GITHUB_ENV
43
- swiftc --version
36
+ - name : Install Swift
37
+ uses : ./.github/actions/install-swift
44
38
45
39
- name : Build ${{ matrix.example }}
46
40
working-directory : ${{ matrix.example }}
Original file line number Diff line number Diff line change
1
+ main-snapshot-2025-04-12
You can’t perform that action at this time.
0 commit comments