Repository navigation
57 lines (57 loc) · 1.74 KB
/
Copy pathlinux.yml
File metadata and controls
57 lines (57 loc) · 1.74 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
name: Testbuild for Linux
run-name: testbuild_linux
on:
push:
branches:
- 'master'
pull_request:
types:
- edited
- opened
- synchronize
concurrency:
# Cancel concurrent workflows for the same PR or commit hash.
group: ${{github.workflow}}-${{github.event_name == 'pull_request' && github.head_ref || github.sha}}
cancel-in-progress: true
jobs:
build_ubuntu_x86_64:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- env: ubuntu
steps:
- name: Install build dependencies
run: |
sudo apt update
sudo apt install libgl1-mesa-dev libsdl2-dev libopenal-dev libcurl4-openssl-dev cmake ninja-build
- name: Check out repository code
uses: actions/checkout@v4
- name: Build
run: |
mkdir build
cd build
cmake -G Ninja ../
ninja
- name: Create testbuild package
run: |
# Create release directory tree
export PKGDIR="librecoop-linux-$(git rev-parse --short HEAD)"
echo "pkgname=$PKGDIR" >> $GITHUB_ENV
mkdir -p publish/$PKGDIR/librecoop
mkdir publish/$PKGDIR/librecoopd3xp
# Copy release assets
cd build
cp librecoop.so librecoop.so ../publish/$PKGDIR/
cd ..
# Copy misc assets
echo "librecoop for 64bit (amd64 aka x86_64 aka x64) Linux, built $(date)" > publish/$PKGDIR/README.txt
echo -e "from ${{ github.ref_name }} commit ${{ github.sha }}\n" >> publish/$PKGDIR/README.txt
cat README.md >> publish/$PKGDIR/README.txt
- name: Upload testbuild package
uses: actions/upload-artifact@v4
with:
name: ${{ env.pkgname }}
path: publish/
if-no-files-found: error