Skip to content

Commit 2cba767

Browse files
committed
ci
1 parent ff2045f commit 2cba767

2 files changed

Lines changed: 50 additions & 1 deletion

File tree

‎.github/workflows/build.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ jobs:
2020
- name: Install Swift toolchain
2121
run: |
2222
arch="$(uname -m)"
23+
arch_suffix=""
24+
if [ "$arch" != "x86_64" ]; then arch_suffix="-${arch}"; fi
2325
curl -fL -o /tmp/swift.tar.gz \
24-
"https://download.swift.org/swift-${SWIFT_VERSION}-release/debian12-${arch}/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-debian12-${arch}.tar.gz"
26+
"https://download.swift.org/swift-${SWIFT_VERSION}-release/debian12${arch_suffix}/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-debian12${arch_suffix}.tar.gz"
2527
mkdir -p /opt/swift
2628
tar -xzf /tmp/swift.tar.gz -C /opt/swift --strip-components=1
2729
rm /tmp/swift.tar.gz

‎.github/workflows/ci.yml‎

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
env:
9+
SWIFT_VERSION: "6.3.3"
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
container:
15+
image: devkitpro/devkita64:latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Install Swift toolchain
20+
run: |
21+
arch="$(uname -m)"
22+
arch_suffix=""
23+
if [ "$arch" != "x86_64" ]; then arch_suffix="-${arch}"; fi
24+
curl -fL -o /tmp/swift.tar.gz \
25+
"https://download.swift.org/swift-${SWIFT_VERSION}-release/debian12${arch_suffix}/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-debian12${arch_suffix}.tar.gz"
26+
mkdir -p /opt/swift
27+
tar -xzf /tmp/swift.tar.gz -C /opt/swift --strip-components=1
28+
rm /tmp/swift.tar.gz
29+
echo "/opt/swift/usr/bin" >> "$GITHUB_PATH"
30+
31+
- name: Install Swift runtime dependencies
32+
run: |
33+
apt-get update
34+
apt-get install -y --no-install-recommends \
35+
binutils libc6-dev libcurl4-openssl-dev libedit2 libgcc-12-dev \
36+
libncurses6 libpython3.11 libsqlite3-0 libstdc++-12-dev \
37+
libxml2-dev libz3-dev pkg-config tzdata zlib1g-dev zip
38+
39+
- name: Install switch portlibs
40+
run: |
41+
dkp-pacman -Sy --noconfirm switch-curl switch-libjson-c
42+
dkp-pacman -Scc --noconfirm
43+
44+
- name: Build
45+
env:
46+
DEVKITPRO: /opt/devkitpro
47+
run: make

0 commit comments

Comments
 (0)