github.com/Seikaijyu/gio@v0.0.1/.builds/linux.yml (about)

     1  # SPDX-License-Identifier: Unlicense OR MIT
     2  image: debian/testing
     3  packages:
     4   - curl
     5   - pkg-config
     6   - gcc-multilib
     7   - libwayland-dev
     8   - libx11-dev
     9   - libx11-xcb-dev
    10   - libxkbcommon-dev
    11   - libxkbcommon-x11-dev
    12   - libgles2-mesa-dev
    13   - libegl1-mesa-dev
    14   - libffi-dev
    15   - libvulkan-dev
    16   - libxcursor-dev
    17   - libxrandr-dev
    18   - libxinerama-dev
    19   - libxi-dev
    20   - libxxf86vm-dev
    21   - mesa-vulkan-drivers
    22   - wine
    23   - xvfb
    24   - xdotool
    25   - scrot
    26   - sway
    27   - grim
    28   - unzip
    29  sources:
    30   - https://git.sr.ht/~eliasnaur/gio
    31  environment:
    32   PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig/:/usr/lib/i386-linux-gnu/pkgconfig/
    33   PATH: /home/build/sdk/go/bin:/usr/bin:/home/build/go/bin:/home/build/android/tools/bin
    34   ANDROID_SDK_ROOT: /home/build/android
    35   android_sdk_tools_zip: sdk-tools-linux-3859397.zip
    36   android_ndk_zip: android-ndk-r20-linux-x86_64.zip
    37   github_mirror: git@github.com:gioui/gio
    38  secrets:
    39   - 75d8a1eb-5fc5-4074-8a36-db6015d6ed5a
    40  tasks:
    41   - install_go: |
    42       mkdir -p /home/build/sdk
    43       curl -s https://dl.google.com/go/go1.19.11.linux-amd64.tar.gz | tar -C /home/build/sdk -xzf -
    44   - check_gofmt: |
    45       cd gio
    46       test -z "$(gofmt -s -l .)"
    47   - check_sign_off: |
    48       set +x -e
    49       cd gio
    50       for hash in $(git log -n 20 --format="%H"); do
    51          message=$(git log -1 --format=%B $hash)
    52          if [[ ! "$message" =~ "Signed-off-by: " ]]; then
    53              echo "Missing 'Signed-off-by' in commit $hash"
    54              exit 1
    55          fi
    56       done
    57   - mirror: |
    58       # mirror to github
    59       ssh-keyscan github.com > "$HOME"/.ssh/known_hosts && cd gio && git push --mirror "$github_mirror" || echo "failed mirroring"
    60   - add_32bit_arch: |
    61       sudo dpkg --add-architecture i386
    62       sudo apt-get update
    63       sudo apt-get install -y "libwayland-dev:i386" "libx11-dev:i386" "libx11-xcb-dev:i386" "libxkbcommon-dev:i386" "libxkbcommon-x11-dev:i386" "libgles2-mesa-dev:i386" "libegl1-mesa-dev:i386" "libffi-dev:i386" "libvulkan-dev:i386" "libxcursor-dev:i386"
    64   - test_gio: |
    65       cd gio
    66       go test -race ./...
    67       CGO_ENABLED=1 GOARCH=386 go test ./...
    68       GOOS=windows go test -exec=wine ./...
    69       GOOS=js GOARCH=wasm go build -o /dev/null ./...
    70   - install_jdk8: |
    71       curl -so jdk.deb "https://cdn.azul.com/zulu/bin/zulu8.42.0.21-ca-jdk8.0.232-linux_amd64.deb"
    72       sudo apt-get -qq install -y -f ./jdk.deb
    73   - install_android: |
    74       mkdir android
    75       cd android
    76       curl -so sdk-tools.zip https://dl.google.com/android/repository/$android_sdk_tools_zip
    77       unzip -q sdk-tools.zip
    78       rm sdk-tools.zip
    79       curl -so ndk.zip https://dl.google.com/android/repository/$android_ndk_zip
    80       unzip -q ndk.zip
    81       rm ndk.zip
    82       mv android-ndk-* ndk-bundle
    83       yes|sdkmanager --licenses
    84       sdkmanager "platforms;android-31" "build-tools;32.0.0"
    85   - test_android: |
    86       cd gio
    87       CC=$ANDROID_SDK_ROOT/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android29-clang GOOS=android GOARCH=arm64 CGO_ENABLED=1 go build ./...
    88       CC=$ANDROID_SDK_ROOT/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi29-clang GOOS=android GOARCH=arm CGO_ENABLED=1 go build ./...