gioui.org@v0.6.1-0.20240506124620-7a9ce51988ce/.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 # cctools 12 - uuid-dev # cctools 13 - ninja-build # cctools 14 - systemtap-sdt-dev # cctools 15 - libbsd-dev # cctools 16 - linux-libc-dev # cctools 17 - libplist-utils # for gogio 18 sources: 19 - https://git.sr.ht/~eliasnaur/applesdks 20 - https://git.sr.ht/~eliasnaur/gio 21 - https://git.sr.ht/~eliasnaur/giouiorg 22 - https://github.com/tpoechtrager/cctools-port 23 - https://github.com/tpoechtrager/apple-libtapi 24 - https://github.com/tpoechtrager/apple-libdispatch 25 - https://github.com/mackyle/xar 26 environment: 27 APPLE_TOOLCHAIN_ROOT: /home/build/appletools 28 PATH: /home/build/sdk/go/bin:/home/build/go/bin:/usr/bin 29 tasks: 30 - install_go: | 31 mkdir -p /home/build/sdk 32 curl -s https://dl.google.com/go/go1.22.2.linux-amd64.tar.gz | tar -C /home/build/sdk -xzf - 33 - prepare_toolchain: | 34 mkdir -p $APPLE_TOOLCHAIN_ROOT 35 cd $APPLE_TOOLCHAIN_ROOT 36 tar xJf /home/build/applesdks/applesdks.tar.xz 37 mkdir bin tools 38 cd bin 39 ln -s ../toolchain/bin/x86_64-apple-darwin19-ld ld 40 ln -s ../toolchain/bin/x86_64-apple-darwin19-ar ar 41 ln -s /home/build/cctools-port/cctools/misc/lipo lipo 42 ln -s ../tools/appletoolchain xcrun 43 ln -s /usr/bin/plistutil plutil 44 cd ../tools 45 ln -s appletoolchain clang-ios 46 ln -s appletoolchain clang-macos 47 - install_appletoolchain: | 48 cd giouiorg 49 go build -o $APPLE_TOOLCHAIN_ROOT/tools ./cmd/appletoolchain 50 - build_libdispatch: | 51 cd apple-libdispatch 52 cmake -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_INSTALL_PREFIX=$APPLE_TOOLCHAIN_ROOT/libdispatch . 53 ninja 54 ninja install 55 - build_xar: | 56 cd xar/xar 57 ac_cv_lib_crypto_OpenSSL_add_all_ciphers=yes CC=clang ./autogen.sh --prefix=/usr 58 make 59 sudo make install 60 - build_libtapi: | 61 cd apple-libtapi 62 INSTALLPREFIX=$APPLE_TOOLCHAIN_ROOT/libtapi ./build.sh 63 ./install.sh 64 - build_cctools: | 65 cd cctools-port/cctools 66 ./configure --target=x86_64-apple-darwin19 --prefix $APPLE_TOOLCHAIN_ROOT/toolchain --with-libtapi=$APPLE_TOOLCHAIN_ROOT/libtapi --with-libdispatch=$APPLE_TOOLCHAIN_ROOT/libdispatch --with-libblocksruntime=$APPLE_TOOLCHAIN_ROOT/libdispatch 67 make install 68 - test_macos: | 69 cd gio 70 export PATH=/home/build/appletools/bin:$PATH 71 CC=$APPLE_TOOLCHAIN_ROOT/tools/clang-macos GOOS=darwin CGO_ENABLED=1 go build ./... 72 - test_ios: | 73 cd gio 74 CC=$APPLE_TOOLCHAIN_ROOT/tools/clang-ios GOOS=darwin GOARCH=arm64 CGO_ENABLED=1 go build -tags ios ./...