forked from hexa-core-eu/SteamWorks
-
Notifications
You must be signed in to change notification settings - Fork 0
111 lines (105 loc) · 3.38 KB
/
main.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
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
tags:
- 'v*'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [3.8]
os: [ ubuntu-18.04, windows-latest, macos-latest ]
include:
- os: ubuntu-18.04
asset_name: 'package-linux'
zip_cmd: 'zip -r package.zip build/package'
CC: 'clang'
CXX: 'clang'
- os: windows-latest
asset_name: 'package-windows'
zip_cmd: 'powershell Compress-Archive build/package package.zip'
- os: macos-latest
asset_name: 'package-macos'
zip_cmd: 'zip -r package.zip build/package'
CC: 'clang'
CXX: 'clang'
steps:
- uses: actions/checkout@v2
with:
path: 'sm-environment'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Linux Deps
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install -y gcc-multilib g++-multilib
- name: Install Windows Deps
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x86
- name: Checkout AMBuild
uses: actions/checkout@v2
with:
repository: 'alliedmodders/ambuild'
path: 'ambuild'
- name: Install AMBuild
run: |
cd ambuild
python setup.py build
python setup.py install
- name: Checkout SourceMod
uses: actions/checkout@v2
with:
repository: 'alliedmodders/sourcemod'
ref: '1.10-dev'
path: 'sourcemod'
submodules: 'recursive'
- name: Checkout HL2 SDK
uses: actions/checkout@v2
with:
repository: 'alliedmodders/hl2sdk'
ref: 'sdk2013'
path: 'hl2sdk-sdk2013'
- name: Checkout MM Source
uses: actions/checkout@v2
with:
repository: 'alliedmodders/metamod-source'
ref: '1.10-dev'
path: 'mmsource'
- name: Checkout Steam Works
uses: actions/checkout@v2
with:
ssh-key: ${{ secrets.STEAMWORKS_PULL_KEY }}
repository: 'hexa-core-eu/SteamWorksSDK'
ref: '1.49'
path: 'steamworks-sdk'
- name: Run Build
shell: bash
working-directory: ./sm-environment
run: |
mkdir build
cd build
python ../configure.py --hl2sdk-root=$GITHUB_WORKSPACE --mms-path=$GITHUB_WORKSPACE/mmsource --sm-path=$GITHUB_WORKSPACE/sourcemod --steamworks-path=$GITHUB_WORKSPACE/steamworks-sdk --sdks=sdk2013 --enable-optimize
ambuild
- name: Zip Release
working-directory: ./sm-environment
run: ${{ matrix.zip_cmd }}
- name: Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ github.workspace }}/sm-environment/package.zip
asset_name: ${{ matrix.asset_name }}.zip
tag: ${{ github.ref }}