This repository has been archived by the owner on Jan 26, 2025. It is now read-only.
Update build-linux.yml #44
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build [Linux] | |
on: | |
push: | |
branches: [ "main", "test" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
container: archlinux | |
steps: | |
- name: Install build tools | |
run: pacman --noconfirm -Syu git wget gcc | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Download libzmq | |
run: wget https://github.com/zeromq/libzmq/releases/download/v4.3.5/zeromq-4.3.5.tar.gz | |
- name: Extract libzmq | |
run: tar -xf ./zeromq-4.3.5.tar.gz | |
- name: Configure libzmq | |
working-directory: zeromq-4.3.5 | |
run: ./configure --enable-drafts --enable-static --disable-shared --disable-libbsd --prefix=${{ github.workspace }}/src/nativeInterop/ | |
- name: Compile libzmq | |
working-directory: zeromq-4.3.5 | |
run: make -j$(nproc) && make install | |
- name: Install dependencies | |
run: pacman --noconfirm -Sy mpv libappindicator-gtk3 | |
# - name: Install dependencies | |
# uses: awalsh128/cache-apt-pkgs-action@latest | |
# with: | |
# packages: libappindicator3-dev libcurl4-openssl-dev libarchive-dev libasound2-dev libass-dev libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libbluray-dev libcaca-dev libcdio-paranoia-dev libdrm-dev libdvdnav-dev libegl-dev libffmpeg-nvenc-dev libgbm-dev libgl-dev libjack-dev liblua5.2-dev libplacebo-dev libpulse-dev librubberband-dev libsdl2-dev libsixel-dev libswscale-dev libuchardet-dev libva-dev libvdpau-dev libvulkan-dev libwayland-dev libx11-dev libxinerama-dev libxkbcommon-dev libxpresent-dev libxrandr-dev libxss-dev libxv-dev libmujs-dev libzimg-dev libpipewire-0.3-dev libspirv-cross-c-shared-dev | |
# version: 1.0 | |
# - name: Download libmpv-dev_0.35.1 | |
# run: wget http://mirrors.kernel.org/ubuntu/pool/universe/m/mpv/libmpv-dev_0.35.1-2ubuntu1_amd64.deb -O libmpv-dev.deb | |
# - name: Install libmpv-dev_0.35.1 | |
# run: sudo dpkg-deb -R ./libmpv-dev.deb / && sudo rm -rf /DEBIAN | |
# - name: Download libmpv2_0.35.1 | |
# run: wget http://mirrors.kernel.org/ubuntu/pool/universe/m/mpv/libmpv2_0.35.1-2ubuntu1_amd64.deb -O libmpv2.deb | |
# - name: Install libmpv2_0.35.1 | |
# run: sudo dpkg-deb -R ./libmpv2.deb / | |
# - name: test | |
# run: ls /usr/lib/x86_64-linux-gnu/ | grep mpv | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradle | |
- name: Build native binaries | |
run: ./gradlew nativeBinaries -PlinkStatic | |
- name: Strip release binary | |
run: strip build/bin/native/releaseExecutable/spmp-server.kexe | |
- name: Upload debug binary | |
uses: actions/upload-artifact@v3 | |
with: | |
name: spms-linux-debug.kexe | |
path: build/bin/native/debugExecutable/spmp-server.kexe | |
- name: Upload release binary | |
uses: actions/upload-artifact@v3 | |
with: | |
name: spms-linux-release.kexe | |
path: build/bin/native/releaseExecutable/spmp-server.kexe | |