-
Notifications
You must be signed in to change notification settings - Fork 7
65 lines (58 loc) · 1.99 KB
/
cctools-prebuilt.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: cctools prebuilt
on: workflow_dispatch
jobs:
build:
name: cctools [${{matrix.arch}}-${{matrix.os}}]
runs-on: ${{matrix.runner}}
strategy:
fail-fast: false
matrix:
arch: [ x86_64 ]
os: [ ubuntu-20.04, ubuntu-22.04 ]
include:
- os: ubuntu-20.04
runner: ubuntu-20.04
- os: ubuntu-22.04
runner: ubuntu-22.04
steps:
- name: Configure Linux runner
run: |
sudo apt update
sudo apt install git xz-utils ninja-build
sudo apt install libssl-dev libxml2-dev liblzma-dev libbz2-dev
- name: Build libxar
run: |
git clone https://github.com/tpoechtrager/xar.git
cd xar/xar
./autogen.sh
./configure --prefix=/tmp/cctools
make
make install
rm /tmp/cctools/lib/libxar.la
mv $(readlink -f /tmp/cctools/lib/libxar.so) /tmp/cctools/lib/libxar.so
cd ..
- name: Build libtapi
run: |
git clone https://github.com/tpoechtrager/apple-libtapi.git
cd apple-libtapi
INSTALLPREFIX=/tmp/cctools ./build.sh
./install.sh
mv $(readlink -f /tmp/cctools/lib/libtapi.so) /tmp/cctools/lib/libtapi.so
cd ..
- name: Build cctools
run: |
git clone https://github.com/tpoechtrager/cctools-port.git
cd cctools-port/cctools
./configure --prefix=/tmp/cctools --with-libtapi=/tmp/cctools --with-libxar=/tmp/cctools
make
make install
cd ../..
- name: Package cctools
run: |
mv /tmp/cctools ./cctools-${{matrix.arch}}-${{matrix.os}}
tar -cJf cctools-${{matrix.arch}}-${{matrix.os}}.tar.xz cctools-${{matrix.arch}}-${{matrix.os}}
- name: Upload cctools package
uses: actions/upload-artifact@v3
with:
name: cctools-${{matrix.arch}}-${{matrix.os}}
path: cctools-${{matrix.arch}}-${{matrix.os}}.tar.xz