Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

feat(gokai_sdk): add aarch64 #59

feat(gokai_sdk): add aarch64

feat(gokai_sdk): add aarch64 #59

Workflow file for this run

name: Build SDK
on: [pull_request, push]
jobs:
flatpak:
strategy:
matrix:
arch: [aarch64, x86_64]
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v3
- if: ${{ matrix.arch != 'x86_64' }}
name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Install dependencies
run: sudo apt install -y flatpak flatpak-builder
- name: Set up Flatpak repositories
run: |
flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak remote-add --user --if-not-exists flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo
- name: Build
run: |
cp packages/gokai_sdk/data/com.expidusos.gokai.Sdk.json.in com.expidusos.gokai.Sdk.json
sed -i "s|@branch@|${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}|g" com.expidusos.gokai.Sdk.json
flatpak-builder --install-deps-from=flathub --install-deps-from=flathub-beta --user --arch=${{ matrix.arch }} --repo=repo builddir com.expidusos.gokai.Sdk.json
linux:
strategy:
matrix:
target: [x64-generic]
engine: [cdbeda788a293fa29665dc3fa3d6e63bd221cb0d]
mode: [release, profile, debug]
buildtype: [release, debug]
runs-on: ubuntu-latest
container: archlinux:latest
continue-on-error: true
steps:
- uses: actions/checkout@v3
- name: Fetch Engine
run: |
curl -L "https://github.com/ardera/flutter-ci/releases/download/engine%2F${{ matrix.engine }}/${{ matrix.target }}.tar.xz" -o flutter-engine.tar.xz
mkdir flutter-engine
tar -xf flutter-engine.tar.xz -C flutter-engine
pushd flutter-engine
cp libflutter_engine.so.${{ matrix.mode }} libflutter_engine.so
export target=$(echo ${{ matrix.target }} | cut -f1 -d '-')
if [[ -f gen_snapshot_linux_${target}_${{ matrix.mode }} ]]; then
cp gen_snapshot_linux_${target}_${{ matrix.mode }} gen_snapshot
else
cp gen_snapshot_linux_${target}_release gen_snapshot
fi
popd
rm flutter-engine.tar.xz
- name: Install dependencies
run: |
pacman -Syu --noconfirm
pacman -S --noconfirm base-devel meson pkg-config ninja wayland wayland-protocols \
wlroots libuv libxdg-basedir glib2 packagekit yaml-cpp udev glm cairo \
libglvnd vulkan-icd-loader vulkan-headers util-linux-libs jsoncpp libxkbcommon accountsservice \
libdrm libevdev upower git cmake
for name in fmt spdlog; do
git clone https://aur.archlinux.org/$name-git.git
chmod -R a+w $name-git
pushd $name-git
sudo -u nobody makepkg --noconfirm
pacman --noconfirm -U $name-git*.pkg.tar.zst
popd
done
git clone https://github.com/graeme-hill/crossguid crossguid
curl -L "https://raw.githubusercontent.com/graeme-hill/crossguid/1eb9bea38c320b2b588635cffceaaa2a8d434780/include/crossguid/guid.hpp" -o crossguid/include/crossguid/guid.hpp
pushd crossguid
cmake .
make
install -D -m644 libcrossguid.a /usr/lib/libcrossguid.a
install -D -m644 include/crossguid/guid.hpp /usr/include/crossguid/guid.hpp
install -D -m644 crossguid.pc /usr/lib/pkgconfig/crossguid.pc
popd
- name: Configure
run: meson setup packages/gokai_sdk builddir -Dprefix=/usr -Dflutter-engine=$(readlink -e flutter-engine) -Dbuildtype=${{ matrix.buildtype }}
- name: Build
run: ninja -C builddir
- name: Install
run: |
mkdir installdir
DESTDIR=$(readlink -e installdir) ninja -C builddir install
- name: Upload artifact
uses: actions/[email protected]
with:
name: ${{ matrix.engine }}-${{ matrix.target }}-${{ matrix.mode }}-${{ matrix.buildtype }}
path: installdir/*