Skip to content

Commit 65af476

Browse files
committed
+GitHub actions build script
1 parent 5b35426 commit 65af476

File tree

4 files changed

+62
-8
lines changed

4 files changed

+62
-8
lines changed

.github/workflows/main.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build Boost Libraries
2+
on:
3+
release:
4+
types: [published]
5+
push:
6+
tags:
7+
- 1.**
8+
workflow_dispatch:
9+
jobs:
10+
Build:
11+
runs-on: macos-latest
12+
timeout-minutes: 120
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Build
16+
run: |
17+
export ICU4C_RELEASE_LINK=https://github.com/apotocki/icu4c-iosx/releases/download/72.1.1
18+
scripts/build.sh
19+
for i in frameworks/*.xcframework/; do cd frameworks && zip -9 -r "$(basename -- $i).zip" $(basename -- $i) & done; wait
20+
cd frameworks
21+
mv Headers include
22+
zip -9 -r include.zip include
23+
wait
24+
- name: Release
25+
uses: softprops/action-gh-release@v1
26+
if: startsWith(github.ref, 'refs/tags/')
27+
with:
28+
files: |
29+
frameworks/*.zip

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ graph_parallel, mpi, python
3939
use_frameworks!
4040
pod 'boost-iosx', '~> 1.81.0'
4141
# or optionally more precisely e.g.:
42-
# pod 'boost-iosx', :git => 'https://github.com/apotocki/boost-iosx', :tag => '1.81.0.1'
42+
# pod 'boost-iosx', :git => 'https://github.com/apotocki/boost-iosx', :tag => '1.81.0.2'
4343
```
4444
If you want to use particular boost libraries, specify them as in the following example for log and program_options libraries:
4545
```

boost-iosx.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "boost-iosx"
3-
s.version = "1.81.0.1"
3+
s.version = "1.81.0.2"
44
s.summary = "Boost C++ libraries"
55
s.homepage = "https://github.com/apotocki/boost-iosx"
66
s.license = "Boost Software License"

scripts/build.sh

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,37 @@ fi
3535

3636
############### ICU
3737
if [[ ! -d $SCRIPT_DIR/Pods/icu4c-iosx/product ]]; then
38-
pushd $SCRIPT_DIR
39-
pod repo update
40-
pod install --verbose
41-
pod update --verbose
42-
popd
43-
mkdir $SCRIPT_DIR/Pods/icu4c-iosx/product/lib
38+
if [[ ! -z "${ICU4C_RELEASE_LINK}" ]]; then
39+
if [[ -d $SCRIPT_DIR/Pods/icu4c-iosx ]]; then
40+
rm -rf $SCRIPT_DIR/Pods/icu4c-iosx
41+
fi
42+
mkdir -p $SCRIPT_DIR/Pods/icu4c-iosx/product
43+
pushd $SCRIPT_DIR/Pods/icu4c-iosx/product
44+
curl -L ${ICU4C_RELEASE_LINK}/include.zip -o $SCRIPT_DIR/Pods/icu4c-iosx/product/include.zip
45+
curl -L ${ICU4C_RELEASE_LINK}/icudata.xcframework.zip -o $SCRIPT_DIR/Pods/icu4c-iosx/product/icudata.xcframework.zip
46+
curl -L ${ICU4C_RELEASE_LINK}/icui18n.xcframework.zip -o $SCRIPT_DIR/Pods/icu4c-iosx/product/icui18n.xcframework.zip
47+
curl -L ${ICU4C_RELEASE_LINK}/icuio.xcframework.zip -o $SCRIPT_DIR/Pods/icu4c-iosx/product/icuio.xcframework.zip
48+
curl -L ${ICU4C_RELEASE_LINK}/icuuc.xcframework.zip -o $SCRIPT_DIR/Pods/icu4c-iosx/product/icuuc.xcframework.zip
49+
unzip -q include.zip
50+
unzip -q icudata.xcframework.zip
51+
unzip -q icui18n.xcframework.zip
52+
unzip -q icuio.xcframework.zip
53+
unzip -q icuuc.xcframework.zip
54+
mkdir frameworks
55+
mv include frameworks/Headers
56+
mv icudata.xcframework frameworks/
57+
mv icui18n.xcframework frameworks/
58+
mv icuio.xcframework frameworks/
59+
mv icuuc.xcframework frameworks/
60+
popd
61+
else
62+
pushd $SCRIPT_DIR
63+
pod repo update
64+
pod install --verbose
65+
pod update --verbose
66+
popd
67+
fi
68+
mkdir $SCRIPT_DIR/Pods/icu4c-iosx/product/lib
4469
fi
4570
ICU_PATH=$SCRIPT_DIR/Pods/icu4c-iosx/product
4671
############### ICU

0 commit comments

Comments
 (0)