.github/workflows: add build actions (ffglitch-0.10.2) #27
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: linux-x86_64 build | |
on: | |
push: | |
branches: | |
- ffedit-0.10.2-gha | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set up dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y nasm libsdl2-dev libdrm-dev | |
- name: Build static zlib-ng | |
run: | | |
ZLIB_NG_VERSION="2.2.2" | |
curl -L "https://github.com/zlib-ng/zlib-ng/archive/refs/tags/${ZLIB_NG_VERSION}.tar.gz" -o zlib-ng.tar.gz | |
tar xf zlib-ng.tar.gz | |
cd zlib-ng-${ZLIB_NG_VERSION} | |
mkdir build | |
cd build | |
cmake .. -DZLIB_COMPAT=ON -DWITH_GTEST=OFF -DBUILD_SHARED_LIBS=OFF -DZLIB_ENABLE_TESTS=OFF | |
make -j$(nproc) | |
sudo make install | |
- name: Build project | |
run: | | |
mkdir build | |
cd build | |
../configure --disable-doc --enable-gpl --enable-static --disable-shared --disable-autodetect --disable-iconv --enable-zlib --enable-libxvid --enable-rtmidi --enable-libzmq --enable-sdl2 --enable-libxcb --enable-libdrm | |
make -j$(nproc) | |
make -j$(nproc) qjs | |
- name: Package binaries | |
run: | | |
VERSION=$(cat FFGLITCH_VERSION) | |
VERSION_NUMBERS=$(echo "${VERSION}" | sed 's/^[^-]*-//') | |
FULL_NAME="${VERSION}-linux-x86_64" | |
OUTPUT_FILE="${FULL_NAME}.zip" | |
ZLIB_NG_VERSION="2.2.2" | |
sed s/FFGLITCH_VERSION/"${VERSION_NUMBERS}"/g -i ffglitch_readme.txt | |
sed s/PLATFORM/Linux/g -i ffglitch_readme.txt | |
sed s/ARCH/x86_64/g -i ffglitch_readme.txt | |
sed s/ZLIB_NG_VERSION/"${ZLIB_NG_VERSION}"/g -i ffglitch_readme.txt | |
sed '/SDL2_VERSION/d' -i ffglitch_readme.txt | |
cd build | |
mkdir "${FULL_NAME}" | |
cp ffedit ffgac fflive qjs "${FULL_NAME}" | |
cp ../ffglitch_readme.txt "${FULL_NAME}"/readme.txt | |
zip -9 -r "../${OUTPUT_FILE}" "${FULL_NAME}" | |
shell: bash | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-artifacts | |
path: "${{ github.workspace }}/ffglitch-*-linux-x86_64.zip" |