forked from FWGS/xash3d-fwgs
-
Notifications
You must be signed in to change notification settings - Fork 16
139 lines (135 loc) · 4.11 KB
/
c-cpp.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: Build & Deploy Engine
on:
push:
paths-ignore:
- '**.md'
- 'ref/vk/data/**'
pull_request:
paths-ignore:
- '**.md'
- 'ref/vk/data/**'
jobs:
# cleanup:
# runs-on: self-hosted
# steps:
# - name: Cleanup
# run: rm -rf .* || true
build:
runs-on: ${{ matrix.os }}
continue-on-error: true
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
targetos: linux
targetarch: amd64
- os: ubuntu-20.04
targetos: linux
targetarch: i386
# TODO enable and test ref_vk for it too
# - os: ubuntu-aarch64-20.04
# targetos: linux
# targetarch: aarch64
# - os: ubuntu-20.04
# targetos: android
# targetarch: 32
# - os: ubuntu-20.04
# targetos: android
# targetarch: 64
# - os: ubuntu-20.04
# targetos: motomagx
# targetarch: armv6
# - os: ubuntu-20.04
# targetos: nswitch
# targetarch: arm64
# - os: ubuntu-20.04
# targetos: psvita
# targetarch: armv7hf
- os: windows-latest
targetos: win32
targetarch: amd64
- os: windows-latest
targetos: win32
targetarch: i386
env:
SDL_VERSION: 2.26.2
VULKAN_SDK_VERSION: 1.3.239
GH_CPU_ARCH: ${{ matrix.targetarch }}
ANDROID_SDK_TOOLS_VER: 4333796
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install dependencies
run: bash scripts/gha/deps_${{ matrix.targetos }}.sh
- name: Build engine
run: bash scripts/gha/build_${{ matrix.targetos }}.sh
- name: Upload engine (artifacts)
uses: actions/upload-artifact@v3
with:
name: artifact-${{ matrix.targetos }}-${{ matrix.targetarch }}
path: artifacts/*
# See https://github.com/w23/xash3d-fwgs/issues/430
# flatpak:
# name: "Flatpak"
# runs-on: ubuntu-latest
# strategy:
# matrix:
# include:
# - app: su.xash.Engine.Compat.i386
# container:
# image: bilelmoussaoui/flatpak-github-actions:freedesktop-22.08
# options: --privileged
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# UPLOADTOOL_ISPRERELEASE: true
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# with:
# submodules: recursive
# - name: Build flatpak (Compat.i386)
# uses: FWGS/flatpak-github-actions/flatpak-builder@v5
# with:
# bundle: ${{ matrix.app }}.flatpak
# manifest-path: scripts/flatpak/${{ matrix.app }}.yml
# - name: Upload engine (prereleases)
# run: bash scripts/continious_upload.sh ${{ matrix.app }}.flatpak
# Completely disable uplodaing, as it does not make any sense for Vulkan branch for now
# release:
# name: "Upload releases"
# runs-on: ubuntu-latest
# needs: [build, flatpak]
# if: ${{ github.event_name == 'push' }}
# steps:
# - name: Remove old release
# uses: FWGS/[email protected]
# with:
# tag_name: ${{ github.ref_name == 'master' && 'continuous' || format('continuous-{0}', github.ref_name) }}
# delete_release: true
# github_token: ${{ secrets.GITHUB_TOKEN }}
# - name: Fetch artifacts
# uses: actions/[email protected]
# with:
# path: artifacts/
# - name: Repackage binaries and allow GitHub to process removed release for few seconds
# run: |
# cd artifacts/
# for i in artifact-* su.xash.Engine.*; do
# mv "$i"/* .
# rm -rf "$i"
# done
# ls -R .
# cd ../
# sleep 20s
# - name: Upload new release
# uses: FWGS/[email protected]
# with:
# name: Xash3D FWGS Continuous ${{ github.ref_name }} Build
# tag_name: ${{ github.ref_name == 'master' && 'continuous' || format('continuous-{0}', github.ref_name) }}
# prerelease: true
# token: ${{ secrets.GITHUB_TOKEN }}
# files: artifacts/*
# draft: false