-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaction.yml
85 lines (81 loc) · 3.15 KB
/
action.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
name: "Build ObEngine plugin"
description: "Build and release an ÖbEngine plugin"
inputs:
obengineVersion:
description: "ÖbEngine version used to build the plugin (can be a commit reference or a tag)"
required: true
buildDebug:
description: "Whether to build the Debug version of the plugin or not"
required: true
default: true
buildRelease:
description: "Whether to build the Release version of the plugin or not"
required: true
default: true
releaseAs:
description: "Name of the release, use false to disable artifact release"
required: true
outputs:
pluginLocation:
description: "Path to the plugin"
value: ${{ steps.get_plugin_location.outputs.plugin_location }}
runs:
using: "composite"
steps:
- name: "Cloning plugin repository"
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Clean ObEngine submodule
run: rm -rf ObEngine
shell: bash
- name: "Cloning ObEngine repository"
uses: actions/checkout@v2
with:
repository: 'ObEngine/ObEngine'
fetch-depth: 0
ref: ${{ inputs.obengineVersion }}
path: "ObEngine"
- name: Create build directory
run: mkdir build
shell: bash
- name: Install dependencies [MacOS]
run: brew install sfml
shell: bash
if: runner.os == 'macOS'
- name: Install dependencies [Linux]
run: |
sudo apt-get update
sudo apt-get install -y cmake build-essential g++ git libasound2 alsa-utils alsa-oss libasound2-dev
sudo apt-get install -y libfreetype6-dev libxrandr-dev libudev-dev libogg-dev libflac-dev libvorbis-dev libopenal-dev libgl1-mesa-dev
git clone --branch 2.5.1 --depth 1 http://github.com/SFML/SFML.git
cd SFML; cmake .; make -j8; sudo make install
shell: bash
if: runner.os == 'Linux'
- name: Install dependencies [Windows]
run: |
mkdir deps
cd deps; Invoke-WebRequest -Uri "https://www.sfml-dev.org/files/SFML-2.5.1-windows-vc15-64-bit.zip" -OutFile SFML-2.5.1.zip
Expand-Archive -LiteralPath SFML-2.5.1.zip -DestinationPath .
shell: pwsh
if: runner.os == 'Windows'
- name: Prepare compilation [MacOS|Linux]
run: cd build && cmake -DBUILD_TESTS=OFF -DBUILD_TOOLKIT=OFF -DBUILD_PLAYER=OFF -DCMAKE_BUILD_TYPE=Release ..
shell: bash
if: runner.os == 'macOS' || runner.os == 'Linux'
- name: Prepare compilation [Windows]
run: cd build; cmake -DSFML_DIR="${env:GITHUB_WORKSPACE}/deps/SFML-2.5.1/lib/cmake/SFML" -DBUILD_TESTS=OFF -DBUILD_TOOLKIT=OFF -DBUILD_PLAYER=OFF -DCMAKE_BUILD_TYPE=Release ..
shell: pwsh
if: runner.os == 'Windows'
- name: Compile ObEngine plugin [MacOS|Linux]
run: cmake --build build --config Release -- -j8
shell: bash
if: runner.os == 'macOS' || runner.os == 'Linux'
- name: Compile ObEngine plugin [Windows]
shell: pwsh
run: cmake --build build --config Release -- /m:8
if: runner.os == 'Windows'
- name: Retrieve plugin location
id: get_plugin_location
run: echo "::set-output name=plugin_location::$(cat build/plugin_location | xargs)"
shell: bash