Repository navigation
Expand file tree
/
Copy pathaction.yml
More file actions
73 lines (68 loc) · 2.25 KB
/
Copy pathaction.yml
File metadata and controls
73 lines (68 loc) · 2.25 KB
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
name: 'Install premake5'
description: 'Install premake5'
author: 'Jarod42'
branding:
icon: 'package'
color: 'green'
inputs:
repository:
description: 'Alternative premake fork repository to use'
required: false
default: 'premake/premake-core'
ref:
description: 'The branch, tag or SHA to use'
required: false
default: 'v5.0.0-beta8'
msdev:
description: 'one of vs2019 or vs2022'
required: false
default: 'vs2022'
path:
description: 'Temporary directory where to checkout and build premake'
required: false
default: '.premake-build'
runs:
using: "composite"
steps:
- name: checkout premake5
uses: actions/checkout@v7
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
path: ${{ inputs.path }}
- name: Install dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get -y install uuid-dev
shell: bash
- name: Build premake5
if: runner.os == 'Linux'
run: |
cd ${{ inputs.path }}
make -f Bootstrap.mak linux CONFIG=release
sudo cp bin/release/premake5 /usr/bin/
cd ..
rm -Rf ${{ inputs.path }}
shell: bash
- name: Build premake5
if: runner.os == 'macOS'
run: |
cd ${{ inputs.path }}
CONFIG=release ./Bootstrap.sh
mkdir /Applications/premake5.app
cp bin/release/premake5 /Applications/premake5.app/
cd ..
rm -Rf ${{ inputs.path }}
echo PATH=$PATH:/Applications/premake5.app/ >> $GITHUB_ENV
echo /Applications/premake5.app/ >> GITHUB_PATH
shell: bash
- name: Build premake5
if: runner.os == 'Windows' # 2019 or 2022
run: |
mkdir "C:\Program Files\premake"
$vcvarall_path = vswhere -find VC\Auxiliary\Build\vcvarsall.bat
cmd.exe /c "call ""$vcvarall_path"" x86_amd64 && cd ${{ inputs.path }} && nmake -f Bootstrap.mak MSDEV=${{ inputs.msdev }} windows-msbuild PLATFORM=Win32 CONFIG=release && cp bin/release/premake5.exe ""c:/Program Files/premake"""
Remove-Item ${{ inputs.path }} -Recurse -Force
echo "C:\Program Files\premake" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
shell: powershell