|
14 | 14 | if: startsWith(github.ref, 'refs/tags/v') |
15 | 15 | id: create_release |
16 | 16 |
|
17 | | - build_windows: |
18 | | - needs: [create_release] |
19 | | - runs-on: windows-latest |
20 | | - env: |
21 | | - PREMAKE5_URL: https://github.com/danielga/garrysmod_common/releases/download/premake-build%2F5.0.0-beta2/premake-5.0.0-beta2-windows.zip |
22 | | - OPENSSL_URL: https://download.firedaemon.com/FireDaemon-OpenSSL/openssl-3.2.1.zip |
23 | | - BOOST32_URL: https://downloads.sourceforge.net/project/boost/boost-binaries/1.84.0/boost_1_84_0-msvc-14.3-32.exe |
24 | | - BOOST64_URL: https://downloads.sourceforge.net/project/boost/boost-binaries/1.84.0/boost_1_84_0-msvc-14.3-64.exe |
25 | | - steps: |
26 | | - - uses: actions/checkout@v4 |
27 | | - - name: Add msbuild to PATH |
28 | | - uses: microsoft/setup-msbuild@v2 |
29 | | - - name: Build |
30 | | - run: | |
31 | | - $ErrorActionPreference = 'Stop' |
32 | | - Set-PSDebug -Trace 1 |
33 | | -
|
34 | | - mkdir .\openssl |
35 | | - mkdir .\lib\windows |
36 | | - mkdir .\lib64\windows |
37 | | -
|
38 | | - Invoke-WebRequest -uri "$env:PREMAKE5_URL" -Method "GET" -Outfile ".\premake5.zip" |
39 | | - Invoke-WebRequest -uri "$env:OPENSSL_URL" -Method "GET" -Outfile ".\openssl.zip" |
40 | | - Invoke-WebRequest -UserAgent "curl/7.81.0" -uri "$env:BOOST32_URL" -Method "GET" -Outfile ".\boost32.exe" |
41 | | - Invoke-WebRequest -UserAgent "curl/7.81.0" -uri "$env:BOOST64_URL" -Method "GET" -Outfile ".\boost64.exe" |
42 | | -
|
43 | | - Expand-Archive ".\premake5.zip" -DestinationPath ".\" -Force |
44 | | - Expand-Archive ".\openssl.zip" -DestinationPath ".\openssl" -Force |
45 | | - Start-Process .\boost32.exe -NoNewWindow -Wait -ArgumentList "/silent" |
46 | | - Start-Process .\boost64.exe -NoNewWindow -Wait -ArgumentList "/silent" |
47 | | -
|
48 | | - Move-Item -Path .\openssl\openssl-3\x86\lib\*.lib -Destination .\lib\windows |
49 | | - Move-Item -Path .\openssl\openssl-3\x64\lib\*.lib -Destination .\lib64\windows |
50 | | - Move-Item -Path C:\local\boost_*\boost -Destination .\include |
51 | | - Move-Item -Path C:\local\boost_*\lib32*\libboost_system-vc143-mt-s-x32-*.lib -Destination .\lib\windows\boost_system.lib |
52 | | - Move-Item -Path C:\local\boost_*\lib64*\libboost_system-vc143-mt-s-x64-*.lib -Destination .\lib64\windows\boost_system.lib |
53 | | -
|
54 | | - .\premake5 --file=BuildProjects.lua --os=windows vs2022 |
55 | | -
|
56 | | - Move-Item -Path .\openssl\openssl-3\x64\include\openssl -Destination .\include |
57 | | - msbuild .\solutions\windows-vs2022\GWSockets.sln /m /p:Configuration=Release /p:Platform=x64 |
58 | | - Move-Item -Path .\include\openssl -Destination .\openssl\openssl-3\x64\include |
59 | | - |
60 | | - Move-Item -Path .\openssl\openssl-3\x86\include\openssl -Destination .\include |
61 | | - msbuild .\solutions\windows-vs2022\GWSockets.sln /m /p:Configuration=Release /p:Platform=Win32 |
62 | | - Move-Item -Path .\include\openssl -Destination .\openssl\openssl-3\x86\include |
63 | | - - name: Upload release |
64 | | - uses: softprops/action-gh-release@v2 |
65 | | - if: startsWith(github.ref, 'refs/tags/v') |
66 | | - with: |
67 | | - tag_name: ${{ needs.create_release.outputs.tag-name }} |
68 | | - fail_on_unmatched_files: true |
69 | | - files: "out/**/*.dll" |
70 | | - |
71 | 17 | build_linux: |
72 | 18 | needs: [create_release] |
73 | 19 | runs-on: ubuntu-latest |
|
80 | 26 | set -ex |
81 | 27 |
|
82 | 28 | sudo apt-get -y install ppa-purge |
83 | | - sudo ppa-purge -y ppa:ubuntu-toolchain-r/test |
84 | 29 | sudo dpkg --add-architecture i386 |
85 | 30 | sudo apt-get update |
86 | 31 | sudo apt-get -y install gcc-multilib g++-multilib libssl-dev libboost-dev libboost-system-dev libssl-dev:i386 libboost-dev:i386 libboost-system-dev:i386 |
|
99 | 44 | tag_name: ${{ needs.create_release.outputs.tag-name }} |
100 | 45 | fail_on_unmatched_files: true |
101 | 46 | files: "out/**/*.dll" |
102 | | - |
103 | | - build_macos: |
104 | | - needs: [create_release] |
105 | | - runs-on: macos-latest |
106 | | - steps: |
107 | | - - uses: actions/checkout@v4 |
108 | | - - name: Build |
109 | | - env: |
110 | | - AR: |
111 | | - run: | |
112 | | - set -ex |
113 | | -
|
114 | | - export HOMEBREW_ROOT="$(brew --prefix)" |
115 | | - brew install premake make openssl boost |
116 | | -
|
117 | | - ln -sf "${HOMEBREW_ROOT}/opt/openssl/include/openssl" "${HOMEBREW_ROOT}/opt/boost/include/boost" include |
118 | | -
|
119 | | - mkdir -p lib64/macosx |
120 | | - ln -sf "${HOMEBREW_ROOT}/opt/openssl/lib/"* "${HOMEBREW_ROOT}/opt/boost/lib/"* lib64/macosx |
121 | | -
|
122 | | - premake5 --file=BuildProjects.lua --os=macosx gmake |
123 | | - cd solutions/macosx-gmake |
124 | | - gmake config=release_x86_64 -j$(sysctl -n hw.logicalcpu) |
125 | | - - name: Upload release |
126 | | - uses: softprops/action-gh-release@v2 |
127 | | - if: startsWith(github.ref, 'refs/tags/v') |
128 | | - with: |
129 | | - tag_name: ${{ needs.create_release.outputs.tag-name }} |
130 | | - fail_on_unmatched_files: true |
131 | | - files: "out/**/*.dll" |
0 commit comments