github.com/cybriq/giocore@v0.0.7-0.20210703034601-cfb9cb5f3900/.builds/apple.yml (about)

     1  # SPDX-License-Identifier: Unlicense OR MIT
     2  image: debian/testing
     3  packages:
     4   - clang
     5   - cmake
     6   - curl
     7   - autoconf
     8   - libxml2-dev
     9   - libssl-dev
    10   - libz-dev
    11   - llvm-dev # for cctools
    12   - uuid-dev ## for cctools
    13   - libplist-utils # for gogio
    14   - golang
    15  sources:
    16   - https://git.sr.ht/~eliasnaur/applesdks
    17   - https://git.sr.ht/~eliasnaur/gio
    18   - https://git.sr.ht/~eliasnaur/giouiorg
    19   - https://github.com/tpoechtrager/cctools-port.git
    20   - https://github.com/tpoechtrager/apple-libtapi.git
    21   - https://github.com/mackyle/xar.git
    22  environment:
    23     APPLE_TOOLCHAIN_ROOT: /home/build/appletools
    24     PATH: /home/build/go/bin:/usr/bin
    25  tasks:
    26   - prepare_toolchain: |
    27       mkdir -p $APPLE_TOOLCHAIN_ROOT
    28       cd $APPLE_TOOLCHAIN_ROOT
    29       tar xJf /home/build/applesdks/applesdks.tar.xz
    30       mkdir bin tools
    31       cd bin
    32       ln -s ../toolchain/bin/x86_64-apple-darwin19-ld ld
    33       ln -s ../toolchain/bin/x86_64-apple-darwin19-ar ar
    34       ln -s /home/build/cctools-port/cctools/misc/lipo lipo
    35       ln -s ../tools/appletoolchain xcrun
    36       ln -s /usr/bin/plistutil plutil
    37       cd ../tools
    38       ln -s appletoolchain clang-ios
    39       ln -s appletoolchain clang-macos
    40   - install_appletoolchain: |
    41       cd giouiorg
    42       go build -o $APPLE_TOOLCHAIN_ROOT/tools ./cmd/appletoolchain
    43   - build_xar: |
    44       cd xar/xar
    45       ac_cv_lib_crypto_OpenSSL_add_all_ciphers=yes CC=clang ./autogen.sh --prefix=/usr
    46       make
    47       sudo make install
    48   - build_libtapi: |
    49       cd apple-libtapi
    50       INSTALLPREFIX=$APPLE_TOOLCHAIN_ROOT/libtapi ./build.sh
    51       ./install.sh
    52   - build_cctools: |
    53       cd cctools-port/cctools
    54       ./configure --prefix $APPLE_TOOLCHAIN_ROOT/toolchain --with-libtapi=$APPLE_TOOLCHAIN_ROOT/libtapi --target=x86_64-apple-darwin19
    55       make install
    56   - test_macos: |
    57       cd gio
    58       export PATH=/home/build/appletools/bin:$PATH
    59       CC=$APPLE_TOOLCHAIN_ROOT/tools/clang-macos GOOS=darwin CGO_ENABLED=1 go build ./...
    60   - test_ios: |
    61       cd gio
    62       CC=$APPLE_TOOLCHAIN_ROOT/tools/clang-ios GOOS=darwin GOARCH=arm64 CGO_ENABLED=1 go build -tags ios ./...
    63   - install_gogio: |
    64       cd gio/cmd
    65       go install ./gogio
    66   - test_ios_gogio: |
    67       mkdir tmp
    68       cd tmp
    69       go mod init example.com
    70       go get -d github.com/cybriq/giocore/example/kitchen
    71       export PATH=/home/build/appletools/bin:$PATH
    72       gogio -target ios -o app.app github.com/cybriq/giocore/example/kitchen