Skip to content

cctools prebuilt

cctools prebuilt #15

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
cd ..
- name: Build libtapi
run: |
git clone https://github.com/tpoechtrager/apple-libtapi.git
cd apple-libtapi
INSTALLPREFIX=/tmp/cctools ./build.sh
./install.sh
rm /tmp/cctools/lib/libtapi.so
mv /tmp/cctools/lib/libtapi.so.8svn /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