diff options
| author | coco875 <59367621+coco875@users.noreply.github.com> | 2025-06-21 02:41:25 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-20 20:41:25 -0600 |
| commit | 66bdf58577533aac66f99326881cd7c4a011e565 (patch) | |
| tree | b592bc7751fcb1ad11c3b56f5634d9c87da92c9e /.github | |
| parent | 12fed2c01c424172c1d249f928f75fab68f29af1 (diff) | |
support older linux distro (#246)
* Update main.yml
* Update main.yml
* disable network lib
* add sdl_net
* remove the upload of artfact in more recent linux version
* Update main.yml
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/main.yml | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6bf2a4a5b..1c36d5efa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -185,6 +185,107 @@ jobs: wget -O gamecontrollerdb.txt https://github.com/mdqinc/SDL_GameControllerDB/blob/master/gamecontrollerdb.txt mv README.md readme.txt mv build-cmake/*.appimage spaghetti.appimage + # - name: Upload build + # uses: actions/upload-artifact@v4 + # with: + # name: Spaghettify-linux + # path: | + # spaghetti.appimage + # config.yml + # yamls + # gamecontrollerdb.txt + + build-linux-old: + needs: generate-port-o2r + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: Update machine + run: sudo apt update + - name: Install dependencies + run: sudo apt-get install gcc g++ git cmake ninja-build lsb-release libsdl2-dev libsdl2-net-dev libpng-dev libsdl2-net-dev libzip-dev zipcmp zipmerge ziptool nlohmann-json3-dev libtinyxml2-dev libspdlog-dev libboost-dev libopengl-dev libogg-dev libvorbis-dev + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2.14 + with: + key: linux-ccache-${{ github.ref }}-${{ github.sha }} + restore-keys: | + linux-ccache-${{ github.ref }} + linux-ccache- + - name: Cache build folders + uses: actions/cache@v4 + with: + key: linux-build-${{ github.ref }}-${{ github.sha }} + restore-keys: | + linux-build-${{ github.ref }} + linux-build- + path: | + SDL2-2.30.3 + tinyxml2-10.0.0 + libzip-1.10.1 + - name: Install latest SDL + run: | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" + if [ ! -d "SDL2-2.30.3" ]; then + wget https://www.libsdl.org/release/SDL2-2.30.3.tar.gz + tar -xzf SDL2-2.30.3.tar.gz + fi + cd SDL2-2.30.3 + ./configure --enable-hidapi-libusb + make -j 10 + sudo make install + sudo cp -av /usr/local/lib/libSDL* /lib/x86_64-linux-gnu/ + - name: Install latest SDL_net + run: | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" + if [ ! -d "SDL2_net-2.2.0" ]; then + wget https://www.libsdl.org/projects/SDL_net/release/SDL2_net-2.2.0.tar.gz + tar -xzf SDL2_net-2.2.0.tar.gz + fi + cd SDL2_net-2.2.0 + ./configure + make -j 10 + sudo make install + sudo cp -av /usr/local/lib/libSDL* /lib/x86_64-linux-gnu/ + - name: Install latest tinyxml2 + run: | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" + wget https://github.com/leethomason/tinyxml2/archive/refs/tags/10.0.0.tar.gz + tar -xzf 10.0.0.tar.gz + cd tinyxml2-10.0.0 + mkdir -p build + cd build + cmake .. + make + sudo make install + - name: Install libzip without crypto + run: | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" + if [ ! -d "libzip-1.10.1" ]; then + wget https://github.com/nih-at/libzip/releases/download/v1.10.1/libzip-1.10.1.tar.gz + tar -xzf libzip-1.10.1.tar.gz + fi + cd libzip-1.10.1 + mkdir -p build + cd build + cmake .. -DENABLE_COMMONCRYPTO=OFF -DENABLE_GNUTLS=OFF -DENABLE_MBEDTLS=OFF -DENABLE_OPENSSL=OFF + make + sudo make install + sudo cp -av /usr/local/lib/libzip* /lib/x86_64-linux-gnu/ + - name: Download spaghetti.o2r + uses: actions/download-artifact@v4 + with: + name: spaghetti.o2r + path: ./build-cmake + - name: Build + run: | + cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=Release + cmake --build build-cmake --config Release -j3 + (cd build-cmake && cpack -G External) + wget -O gamecontrollerdb.txt https://github.com/mdqinc/SDL_GameControllerDB/blob/master/gamecontrollerdb.txt + mv README.md readme.txt + mv build-cmake/*.appimage spaghetti.appimage - name: Upload build uses: actions/upload-artifact@v4 with: |
