-
Notifications
You must be signed in to change notification settings - Fork 9
64 lines (54 loc) · 1.95 KB
/
build-linux.yml
File metadata and controls
64 lines (54 loc) · 1.95 KB
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
name: Build Linux
on:
workflow_dispatch:
inputs:
build_type:
description: 'Build type'
required: true
default: 'Release'
type: choice
options:
- Release
- Debug
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build in Ubuntu 14.04 container
run: |
docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace ubuntu:14.04 bash -c '
set -e
# Add PPA for newer GCC
apt-get update
apt-get install -y software-properties-common
add-apt-repository -y ppa:ubuntu-toolchain-r/test
apt-get update
# Install build dependencies with multilib support
apt-get install -y \
gcc-9 g++-9 gcc-9-multilib g++-9-multilib \
make git wget \
libc6-dev libc6-dev-i386 \
lib32stdc++-9-dev
# Install CMake 3.10+
wget -q https://cmake.org/files/v3.16/cmake-3.16.9-Linux-x86_64.tar.gz
tar -xzf cmake-3.16.9-Linux-x86_64.tar.gz
export PATH=$(pwd)/cmake-3.16.9-Linux-x86_64/bin:$PATH
# Set GCC 9 as default
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 90
# Build
mkdir -p build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ inputs.build_type }}
cmake --build . --target nextclientapi_amxx -j$(nproc)
'
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: nextclientapi_amxx-linux-${{ inputs.build_type }}
path: build/nextclientapi_amxx_i386.so
if-no-files-found: error