Skip to content

Commit 7b2411f

Browse files
committed
Create roothide.yml
1 parent 61508e5 commit 7b2411f

2 files changed

Lines changed: 85 additions & 1 deletion

File tree

.github/workflows/roothide.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: "*** build tipa file ***"
2+
3+
on:
4+
# schedule:
5+
# - cron: '0 */2 * * *' # every 2 hours
6+
workflow_dispatch:
7+
pull_request:
8+
push:
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
build:
16+
runs-on: macos-14
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@main
20+
with:
21+
submodules: recursive
22+
23+
- name: Install Procursus
24+
uses: dhinakg/procursus-action@main
25+
with:
26+
packages: ldid findutils sed coreutils make
27+
28+
- name: Install THEOS
29+
run: |
30+
set -x
31+
export BASEDIR="$(pwd)"
32+
export THEOS="${BASEDIR}/theos"
33+
mkdir -p $THEOS
34+
curl -fsSL https://raw.githubusercontent.com/roothide/theos/master/bin/install-theos >> install-theos.sh
35+
gsed -E "/^\s*get_theos\s*$/,+1 s/^(\s*)(get_sdks)\s*$/\1mkdir -p \${THEOS}\/sdks\n\1touch \${THEOS}\/sdks\/sdk\n\1\2/g" -i install-theos.sh
36+
bash install-theos.sh
37+
curl -L https://github.com/theos/sdks/releases/latest/download/iPhoneOS16.5.sdk.tar.xz --output $THEOS/sdks/iPhoneOS16.5.sdk.tar.xz
38+
gunzip $THEOS/sdks/iPhoneOS16.5.sdk.tar.xz
39+
tar -xf $THEOS/sdks/iPhoneOS16.5.sdk.tar -C $THEOS/sdks
40+
rm $THEOS/sdks/iPhoneOS16.5.sdk.tar
41+
cd $BASEDIR
42+
43+
- name: Build and Install trustcache
44+
run: |
45+
set -x
46+
git clone https://github.com/CRKatri/trustcache
47+
cd trustcache
48+
export CFLAGS="$CFLAGS -I$(brew --prefix openssl)/include -arch arm64"
49+
export LDFLAGS="$LDFLAGS -L$(brew --prefix openssl)/lib -arch arm64"
50+
gmake -j$(sysctl -n hw.physicalcpu) OPENSSL=1
51+
sudo cp trustcache /opt/procursus/bin/
52+
53+
- name: Set Environment Variables
54+
run: |
55+
set -x
56+
T2=$(TZ=UTC-2 date +'%Y%m%d_%H%M%S')
57+
TS=$(date -j -f "%Y%m%d_%H%M%S" "${T2}" +%s)
58+
SHASH=$(git rev-parse --short HEAD)
59+
echo "ctime=${T2}" >> $GITHUB_ENV
60+
echo "ctimestamp=${TS}" >> $GITHUB_ENV
61+
echo "shorthash=${SHASH}" >> $GITHUB_ENV
62+
63+
- name: Install libarchive
64+
run: |
65+
brew install libarchive
66+
67+
- name: Build
68+
run: |
69+
set -x
70+
export BASEDIR="$(pwd)"
71+
export THEOS="${BASEDIR}/theos"
72+
rm -rf $(xcrun --sdk iphoneos --show-sdk-path)/usr/include/xpc $(xcrun --sdk iphoneos --show-sdk-path)/usr/include/xpc.modulemap
73+
./build.sh
74+
VERSION=$(git rev-parse --short HEAD)
75+
mv ./packages/Bootstrap.tipa "./packages/roothide-Bootstrap-${VERSION}.tipa"
76+
echo "version=${VERSION}" >> $GITHUB_ENV
77+
78+
- name: Upload Artifact
79+
id: bootstrap-latest-upload
80+
uses: actions/upload-artifact@v4
81+
with:
82+
name: roothide-Bootstrap-${{ env.version }}.tipa
83+
path: |
84+
${{ github.workspace }}/packages/roothide-Bootstrap-${{ env.version }}.tipa

basebin

0 commit comments

Comments
 (0)