You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
92 lines
2.9 KiB
92 lines
2.9 KiB
name: Linux x86 (i386-linux-gnu) |
|
|
|
on: |
|
push: |
|
branches: |
|
- master |
|
paths-ignore: |
|
- '*.md' |
|
- 'docs/**' |
|
pull_request: |
|
types: [opened, synchronize] |
|
paths-ignore: |
|
- '*.md' |
|
- 'docs/**' |
|
release: |
|
types: [published] |
|
paths-ignore: |
|
- '*.md' |
|
- 'docs/**' |
|
workflow_dispatch: |
|
|
|
concurrency: |
|
group: ${{ github.workflow }}-${{ github.ref }} |
|
cancel-in-progress: true |
|
|
|
jobs: |
|
build: |
|
runs-on: ubuntu-22.04 |
|
steps: |
|
- name: Checkout |
|
uses: actions/checkout@v5 |
|
with: |
|
fetch-depth: 0 |
|
|
|
# Installs dependencies, including x86 libraries (runs `sudo apt-get update` as part of it) |
|
- name: Install dependencies |
|
run: Packaging/nix/debian-cross-i386-prep.sh |
|
|
|
- name: Cache CMake build folder |
|
uses: actions/cache@v4 |
|
with: |
|
path: build |
|
key: ${{ github.workflow }}-v7-${{ github.sha }} |
|
restore-keys: ${{ github.workflow }}-v7- |
|
|
|
- name: Build |
|
working-directory: ${{github.workspace}} |
|
shell: bash |
|
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_LIBSODIUM=OFF because its soversion changes frequently. |
|
# We set DEVILUTIONX_SYSTEM_BZIP2=OFF because Fedora and Debian do not agree on how to link it. |
|
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_LIBSODIUM=OFF \ |
|
-DDEVILUTIONX_SYSTEM_BZIP2=OFF && \ |
|
cmake --build build -j $(getconf _NPROCESSORS_ONLN) --target package |
|
|
|
- name: Package |
|
run: Packaging/nix/LinuxReleasePackaging.sh && mv devilutionx.tar.xz devilutionx-i386-linux-gnu.tar.xz |
|
|
|
# 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 }} |
|
uses: actions/upload-artifact@v4 |
|
with: |
|
name: devilutionx-i386-linux-gnu.tar.xz |
|
path: devilutionx-i386-linux-gnu.tar.xz |
|
|
|
# AppImage cross-packaging is not implemented yet. |
|
# - name: Upload AppImage |
|
# if: ${{ !env.ACT }} |
|
# uses: actions/upload-artifact@v4 |
|
# 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: |
|
file: devilutionx-i386-linux-gnu.* |
|
file_glob: true |
|
overwrite: true |
|
|
|
- name: Clean up artifacts |
|
run: rm -rf build/_CPack_Packages build/package build/*.deb build/*.rpm build/*.appimage build/*.tar.xz
|
|
|