|
|
|
@ -1,4 +1,4 @@ |
|
|
|
name: Linux x86 |
|
|
|
name: Linux x86 (i386-linux-gnu) |
|
|
|
|
|
|
|
|
|
|
|
on: |
|
|
|
on: |
|
|
|
push: |
|
|
|
push: |
|
|
|
@ -7,9 +7,14 @@ on: |
|
|
|
paths-ignore: |
|
|
|
paths-ignore: |
|
|
|
- '*.md' |
|
|
|
- '*.md' |
|
|
|
pull_request: |
|
|
|
pull_request: |
|
|
|
types: [ opened, synchronize ] |
|
|
|
types: [opened, synchronize] |
|
|
|
paths-ignore: |
|
|
|
paths-ignore: |
|
|
|
- '*.md' |
|
|
|
- '*.md' |
|
|
|
|
|
|
|
release: |
|
|
|
|
|
|
|
types: [published] |
|
|
|
|
|
|
|
paths-ignore: |
|
|
|
|
|
|
|
- '*.md' |
|
|
|
|
|
|
|
workflow_dispatch: |
|
|
|
|
|
|
|
|
|
|
|
concurrency: |
|
|
|
concurrency: |
|
|
|
group: ${{ github.workflow }}-${{ github.ref }} |
|
|
|
group: ${{ github.workflow }}-${{ github.ref }} |
|
|
|
@ -17,7 +22,7 @@ concurrency: |
|
|
|
|
|
|
|
|
|
|
|
jobs: |
|
|
|
jobs: |
|
|
|
build: |
|
|
|
build: |
|
|
|
runs-on: ubuntu-22.04 |
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
steps: |
|
|
|
steps: |
|
|
|
- name: Checkout |
|
|
|
- name: Checkout |
|
|
|
uses: actions/checkout@v3 |
|
|
|
uses: actions/checkout@v3 |
|
|
|
@ -25,41 +30,59 @@ jobs: |
|
|
|
fetch-depth: 0 |
|
|
|
fetch-depth: 0 |
|
|
|
|
|
|
|
|
|
|
|
- name: Create Build Environment |
|
|
|
- name: Create Build Environment |
|
|
|
run: > |
|
|
|
run: | |
|
|
|
sudo dpkg --add-architecture i386 && |
|
|
|
# Work around the somewhat broken packages in the GitHub Actions Ubuntu 20.04 image. |
|
|
|
sudo apt-get update -y && |
|
|
|
# https://github.com/actions/runner-images/issues/4620#issuecomment-981333260 |
|
|
|
sudo apt-get install -y cmake file g++-multilib git libfmt-dev:i386 libsdl2-dev:i386 libsodium-dev:i386 libpng-dev:i386 libbz2-dev:i386 rpm wget smpq |
|
|
|
sudo apt-get -y install --allow-downgrades libpcre2-8-0=10.34-7 |
|
|
|
|
|
|
|
Packaging/nix/debian-cross-i386-prep.sh |
|
|
|
|
|
|
|
|
|
|
|
- name: Cache CMake build folder |
|
|
|
- name: Cache CMake build folder |
|
|
|
uses: actions/cache@v3 |
|
|
|
uses: actions/cache@v3 |
|
|
|
with: |
|
|
|
with: |
|
|
|
path: build |
|
|
|
path: build |
|
|
|
key: ${{ github.workflow }}-v1-${{ github.sha }} |
|
|
|
key: ${{ github.workflow }}-v2-${{ github.sha }} |
|
|
|
restore-keys: ${{ github.workflow }}-v1- |
|
|
|
restore-keys: ${{ github.workflow }}-v2- |
|
|
|
|
|
|
|
|
|
|
|
- name: Configure CMake |
|
|
|
|
|
|
|
shell: bash |
|
|
|
|
|
|
|
working-directory: ${{github.workspace}} |
|
|
|
|
|
|
|
run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DCPACK=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_TOOLCHAIN_FILE=../CMake/platforms/linux_i386.toolchain.cmake |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Build |
|
|
|
- name: Build |
|
|
|
working-directory: ${{github.workspace}} |
|
|
|
working-directory: ${{github.workspace}} |
|
|
|
shell: bash |
|
|
|
shell: bash |
|
|
|
run: cmake --build build -j $(nproc) --target package |
|
|
|
env: |
|
|
|
|
|
|
|
CMAKE_BUILD_TYPE: ${{github.event_name == 'release' && 'Release' || 'RelWithDebInfo'}} |
|
|
|
|
|
|
|
# We set DEVILUTIONX_SYSTEM_LIBFMT=OFF because its soversion changes frequently. |
|
|
|
|
|
|
|
# We set DEVILUTIONX_SYSTEM_SIMPLEINI=OFF because we require v4.19+, still missing from many distributions, |
|
|
|
|
|
|
|
# and there is no libsimpleini-dev:i386 for Ubuntu 20.04. |
|
|
|
|
|
|
|
run: | |
|
|
|
|
|
|
|
cmake -S. -Bbuild -DCMAKE_TOOLCHAIN_FILE=../CMake/platforms/linux_i386.toolchain.cmake \ |
|
|
|
|
|
|
|
-DCMAKE_BUILD_TYPE=${{env.CMAKE_BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=/usr -DCPACK=ON \ |
|
|
|
|
|
|
|
-DBUILD_TESTING=OFF -DDEVILUTIONX_SYSTEM_LIBFMT=OFF -DDEVILUTIONX_SYSTEM_SIMPLEINI=OFF && \ |
|
|
|
|
|
|
|
cmake --build build -j $(getconf _NPROCESSORS_ONLN) --target package |
|
|
|
|
|
|
|
|
|
|
|
- name: Package |
|
|
|
- name: Package |
|
|
|
run: Packaging/nix/LinuxReleasePackaging.sh && Packaging/nix/AppImage.sh |
|
|
|
run: Packaging/nix/LinuxReleasePackaging.sh && mv devilutionx.tar.xz devilutionx-i386-linux-gnu.tar.xz |
|
|
|
|
|
|
|
|
|
|
|
- name: Upload-Package |
|
|
|
# AppImage cross-packaging is not implemented yet. |
|
|
|
|
|
|
|
# - name: Package AppImage |
|
|
|
|
|
|
|
# run: Packaging/nix/AppImage.sh && mv devilutionx.appimage devilutionx-i386-linux-gnu.appimage |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Upload Package |
|
|
|
if: ${{ !env.ACT }} |
|
|
|
if: ${{ !env.ACT }} |
|
|
|
uses: actions/upload-artifact@v3 |
|
|
|
uses: actions/upload-artifact@v3 |
|
|
|
with: |
|
|
|
with: |
|
|
|
name: devilutionx_linux_x86.tar.xz |
|
|
|
name: devilutionx-i386-linux-gnu.tar.xz |
|
|
|
path: devilutionx.tar.xz |
|
|
|
path: devilutionx-i386-linux-gnu.tar.xz |
|
|
|
|
|
|
|
|
|
|
|
- name: Upload-AppImage |
|
|
|
# AppImage cross-packaging is not implemented yet. |
|
|
|
if: ${{ !env.ACT }} |
|
|
|
# - name: Upload AppImage |
|
|
|
uses: actions/upload-artifact@v3 |
|
|
|
# if: ${{ !env.ACT }} |
|
|
|
|
|
|
|
# uses: actions/upload-artifact@v3 |
|
|
|
|
|
|
|
# with: |
|
|
|
|
|
|
|
# name: devilutionx-i386-linux-gnu.appimage |
|
|
|
|
|
|
|
# path: devilutionx-i386-linux-gnu.appimage |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Update Release |
|
|
|
|
|
|
|
if: ${{ github.event_name == 'release' && !env.ACT }} |
|
|
|
|
|
|
|
uses: svenstaro/upload-release-action@v2 |
|
|
|
with: |
|
|
|
with: |
|
|
|
name: devilutionx_linux_x86.appimage |
|
|
|
file: devilutionx-i386-linux-gnu.* |
|
|
|
path: devilutionx.appimage |
|
|
|
file_glob: true |
|
|
|
|
|
|
|
overwrite: true |
|
|
|
|