-
Notifications
You must be signed in to change notification settings - Fork 3
65 lines (55 loc) · 1.75 KB
/
Linux_x86.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Linux_x86
on:
push:
branches:
- master
paths-ignore:
- '*.md'
pull_request:
types: [ opened, synchronize ]
paths-ignore:
- '*.md'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Create Build Environment
run: >
sudo dpkg --add-architecture i386 &&
sudo apt-get update -y &&
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
- name: Cache CMake build folder
uses: actions/cache@v2
with:
path: build
key: linux-x86-cmake-v4-${{ github.sha }}
restore-keys: linux-x86-cmake-v4-
- 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
working-directory: ${{github.workspace}}
shell: bash
run: cmake --build build -j $(nproc) --target package
- name: Package
run: Packaging/nix/LinuxReleasePackaging.sh && Packaging/nix/AppImage.sh
- name: Upload-Package
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v2
with:
name: middleearthmod_linux_x86.tar.xz
path: middleearthmod.tar.xz
- name: Upload-AppImage
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v2
with:
name: middleearthmod_linux_x86.appimage
path: middleearthmod.appimage