Skip to content

Commit 6af6a9f

Browse files
committed
CI
1 parent 5108b27 commit 6af6a9f

File tree

6 files changed

+48
-12
lines changed

6 files changed

+48
-12
lines changed

.github/workflows/build.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,11 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v2
16-
- run: sh Scripts/toolchain.sh
16+
- run: sh Scripts/ci.sh
17+
id: script
18+
- name: Release
19+
uses: "marvinpinto/action-automatic-releases@latest"
20+
with:
21+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
22+
automatic_release_tag: "${{ steps.script.outputs.tag }}"
23+
files: 'kivy-ios/*.xcframework.zip'

Scripts/build.sh

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
xcodebuild -create-xcframework -output Frameworks/python3.xcframework \
2-
-library ci/dist/frameworks/python3.xcframework/ios-arm64/libpython3.8.a -headers ci/dist/root/python3/include/python3.8 \
3-
-library ci/dist/frameworks/python3.xcframework/ios-x86_64-simulator/libpython3.8.a -headers ci/dist/root/python3/include/python3.8
1+
cd kivy-ios
2+
3+
xcodebuild -create-xcframework -output libpython3.xcframework \
4+
-library dist/frameworks/python3.xcframework/ios-arm64/libpython3.8.a -headers dist/root/python3/include/python3.8 \
5+
-library dist/frameworks/python3.xcframework/ios-x86_64-simulator/libpython3.8.a -headers dist/root/python3/include/python3.8

Scripts/ci.sh

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
sh Scripts/toolchain.sh
2+
3+
sh Scripts/build.sh
4+
5+
TAG=0.0.`date +%Y%m%d%H%M%S`
6+
7+
sh Scripts/package.sh $TAG
8+
9+
echo "::set-output name=tag::$TAG"
10+
11+
git add Package.swift
12+
git commit -m "add $TAG"

Scripts/package.sh

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
TAG=$1
2+
3+
cd kivy-ios
4+
5+
sed s/TAG/$TAG/g ../Package.swift.in > Package.swift
6+
7+
rm *.zip
8+
9+
for f in *.xcframework
10+
do
11+
zip -r $f.zip $f
12+
rm Package.swift.in
13+
mv Package.swift Package.swift.in
14+
sed s/"$f"_CHECKSUM/`swift package compute-checksum $f.zip`/ Package.swift.in > Package.swift
15+
done
16+
17+
rm ../Package.swift
18+
mv Package.swift ..

Scripts/toolchain.sh

+5
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,8 @@ pip install -e .
88
pip install cython
99

1010
python toolchain.py build python3
11+
12+
mv dist/frameworks/lib* .
13+
14+
rm -rf ../Sources/PythonSupport/lib
15+
mv dist/root/python3/lib ../Sources/PythonSupport

Scripts/zip.sh

-8
This file was deleted.

0 commit comments

Comments
 (0)