Skip to content

build: Update sprites list in sharp_cult-23 #232

build: Update sprites list in sharp_cult-23

build: Update sprites list in sharp_cult-23 #232

Workflow file for this run

name: Build
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
inputs:
refToBuild:
description: 'Branch, tag or commit SHA1 to build'
required: true
type: string
jobs:
ubuntu-build:
runs-on: ubuntu-latest
name: "Linux Ubuntu"
container:
image: ubuntu:latest
env:
DEBIAN_FRONTEND: noninteractive
TZ: Etc/UTC
steps:
- name: Install GIT
run: |
# install GIT, as without it checkout would use REST API
apt update
apt install -y \
git
- name: Checkout code at latest head
if: "${{ inputs.refToBuild == '' }}"
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Checkout code at requested ref
if: "${{ inputs.refToBuild != '' }}"
uses: actions/checkout@v3
with:
ref: ${{ inputs.refToBuild }}
fetch-depth: 0
- name: Set ownership
run: |
# this is to fix GIT not liking owner of the checkout dir
chown -R $(id -u):$(id -g) $PWD
- name: Install dependencies
run: |
apt install -y \
build-essential autoconf autoconf-archive pkg-config libpng-dev libtool make wget unzip
- name: Download imagemagick
run: |
wget 'https://github.com/ImageMagick/ImageMagick/archive/refs/tags/7.1.0-31.tar.gz'
tar xzf 7.1.0-31.tar.gz
rm 7.1.0-31.tar.gz
- name: Build and install imagemagick
run: |
cd ./ImageMagick-7.1.0-31
./configure --prefix=/usr/local --with-bzlib=yes --with-fontconfig=yes \
--with-freetype=yes --with-gslib=yes --with-gvc=yes --with-jpeg=yes --with-jp2=yes \
--with-png=yes --with-tiff=yes --with-xml=yes --with-gs-font-dir=yes
make -j
make install
ldconfig /usr/local/lib/
- name: Download extra tools
run: |
wget 'https://github.com/swfans/pngpal2raw/releases/download/1.0.3.61/pngpal2raw-1_0_3_61-x86_64-ubuntu.zip'
unzip -o -j -d /usr/local/bin/ pngpal2raw-1_0_3_61-x86_64-ubuntu.zip
- name: Check dependencies
run: magick -version
- name: Autoreconf
run: autoreconf -ivf
- name: Configure
run: |
mkdir -p release; cd release
../configure --prefix="/"
- name: Build data files
run: |
cd release
make V=1
- name: Copy for package
run: |
cd release
# Get version marking from C header
PKG_VERSION=$(sed -n 's/^#define[ ]\+GFX_PACKAGE_VERSION "\([^"]\+\)"$/\1/p' gfx_config.h | head -n 1 | tr '.' '_')
make V=1 DESTDIR=$PWD/pkg install
echo "PKG_NAME=syndwarsfx-gfx-$PKG_VERSION" >> $GITHUB_ENV
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.PKG_NAME }}
path: release/pkg/**