-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
55 lines (52 loc) · 2.32 KB
/
ubuntu-22.04.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
name: Ubuntu 22.04 CI
on: [push, workflow_dispatch]
jobs:
build-devenv:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: sudo DOCKER_BUILDKIT=1 docker build ./packaging/docker/devenv --file ./packaging/docker/devenv/Dockerfile.ubuntu.2204 --tag openage-devenv:latest
shell: bash
- name: Save the Docker image
run: |
mkdir -p /tmp/staging
sudo docker save openage-devenv:latest | gzip > /tmp/staging/devenv.tar.gz
shell: bash
- name: Publish the Docker image
uses: actions/upload-artifact@v3
with:
name: devenv-image-compressed.tar.gz
path: '/tmp/staging/devenv.tar.gz'
if-no-files-found: error
retention-days: 30
build:
runs-on: ubuntu-22.04
needs: build-devenv
steps:
- uses: actions/checkout@v4
- name: Create tmp path
run: mkdir -p /tmp/image
shell: bash
- name: Download devenv image
uses: actions/download-artifact@v2
with:
name: devenv-image-compressed.tar.gz
path: '/tmp/image'
- name: Load Docker image
run: sudo docker load --input /tmp/image/devenv.tar.gz
- name: Build openage
run: |
sudo docker run --rm -v "$(pwd)":/mnt/openage -w /mnt/openage openage-devenv:latest \
bash -c 'mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=$(which gcc-11) -DCMAKE_CXX_COMPILER=$(which g++-11) -DCMAKE_CXX_FLAGS='' -DCMAKE_EXE_LINKER_FLAGS='' -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_MODULE_LINKER_FLAGS='' -DCMAKE_SHARED_LINKER_FLAGS='' -DDOWNLOAD_NYAN=YES -DCXX_OPTIMIZATION_LEVEL=auto -DCXX_SANITIZE_FATAL=False -DCXX_SANITIZE_MODE=none -DWANT_BACKTRACE=if_available -DWANT_GPERFTOOLS_PROFILER=if_available -DWANT_GPERFTOOLS_TCMALLOC=False -DWANT_INOTIFY=if_available -DWANT_NCURSES=if_available -DWANT_OPENGL=if_available -DWANT_VULKAN=if_available -G Ninja .. && cmake --build . --parallel $(nproc) -- -k1'
- name: Compress build artifacts
run: |
mkdir -p /tmp/openage
tar -czvf /tmp/openage/openage-build.tar.gz ./build
- name: Publish build artifacts
uses: actions/upload-artifact@v3
with:
name: openage-build.tar.gz
path: '/tmp/openage/openage-build.tar.gz'
if-no-files-found: error
retention-days: 30