-
Notifications
You must be signed in to change notification settings - Fork 20
99 lines (86 loc) · 3.99 KB
/
artifact.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
name: Artifacts (Package)
on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: recursive
- name: Prepare Artifact Git Info
shell: bash
run: |
echo "##[set-output name=branch;]${GITHUB_REF#refs/heads/}"
ARTIFACT_NAME="commit-$(git rev-parse --short "$GITHUB_SHA")"
if [ ${{ github.event_name == 'pull_request' }} ]; then
echo "##[set-output name=short-sha;]$(git rev-parse --short "${{ github.event.pull_request.head.sha }}")"
if [ ! -z "${{ github.event.pull_request.number }}" ]; then
ARTIFACT_NAME="pr-${{ github.event.pull_request.number }}-commit-$(git rev-parse --short "${{ github.event.pull_request.head.sha }}")"
fi
else
echo "##[set-output name=short-sha;]$(git rev-parse --short "$GITHUB_SHA")"
fi
echo "##[set-output name=artifact-metadata;]${ARTIFACT_NAME}"
id: git-vars
- uses: actions/setup-python@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.x.x
- run: |
sudo apt-add-repository -y ppa:ondrej/php
sudo apt-get install ppa-purge
sudo ppa-purge -y ppa:ondrej/php
sudo dpkg --add-architecture i386
wget -qO - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
sudo apt-add-repository "deb https://dl.winehq.org/wine-builds/ubuntu focal main"
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-focal.list https://packages.lunarg.com/vulkan/lunarg-vulkan-focal.list
sudo apt update
sudo apt install --no-install-recommends -y ninja-build cmake vulkan-sdk winehq-staging wine-staging wine-staging-dev mingw-w64
pip install meson
- run: |
VERSION=$(git describe --always --tags)
OUTDIR="${PWD}/dist/latencyflex-${VERSION}"
echo "VERSION=${VERSION}" >> $GITHUB_ENV
echo "OUTDIR=${OUTDIR}" >> $GITHUB_ENV
mkdir -p $OUTDIR
- run: |
cd layer
meson build -Dprefix=/usr
ninja -C build
mkdir -p "${OUTDIR}/layer"
DESTDIR="${OUTDIR}/layer" meson install -C build --skip-subprojects
- run: |
export LIBRARY_PATH="${OUTDIR}/layer/usr/lib/x86_64-linux-gnu"
cd layer/wine
meson build-wine64 -Dprefix=/usr --cross cross-wine64.txt
ninja -C build-wine64
meson build-mingw64 -Dprefix=/usr --cross cross-mingw64.txt
ninja -C build-mingw64
mkdir -p "${OUTDIR}/wine"
DESTDIR="${OUTDIR}/wine" meson install -C build-wine64 --skip-subprojects
DESTDIR="${OUTDIR}/wine" meson install -C build-mingw64 --skip-subprojects
- run: |
cd layer/unity
OUTDIR_=$OUTDIR
export OUTDIR="${OUTDIR_}/unity/mono-2018.1"
dotnet build --configuration Release -p:UnityTarget=2018.1 -p:UnityRuntime=Mono LatencyFleX.csproj
export OUTDIR="${OUTDIR_}/unity/mono-2019.3"
dotnet build --configuration Release -p:UnityTarget=2019.3 -p:UnityRuntime=Mono LatencyFleX.csproj
export OUTDIR="${OUTDIR_}/unity/il2cpp-2019.3"
dotnet build --configuration Release -p:UnityTarget=2019.3 -p:UnityRuntime=IL2CPP LatencyFleX.csproj
- run: |
tar Jcvf "latencyflex-${VERSION}.tar.xz" -C dist latencyflex-${VERSION}
- name: Upload artifact
uses: actions/upload-artifact@v2
continue-on-error: true
with:
name: latencyflex-${{steps.git-vars.outputs.artifact-metadata}}
path: ${{env.OUTDIR}}
retention-days: 30
- name: Create Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: latencyflex-${{ env.VERSION }}.tar.xz