q3_ui: Replace most macros for better security, easier debugging and … #263
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [push] | |
jobs: | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build Windows QVM | |
run: | | |
./build.bat | |
env: | |
ARCHIVE: 1 | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Update and get packages | |
run: | | |
sudo apt-get update # && sudo apt-get upgrade -y | |
sudo apt-get install -y build-essential | |
sudo apt-get install -y libc6-dev-i386 | |
sudo apt-get install -y g++-multilib | |
sudo apt-get install -y gcc-mingw-w64 | |
sudo apt-get install -y p7zip-full | |
- name: Build .dll and .so | |
run: | | |
make -j8 release ARCH=x86 | |
make -j8 release PLATFORM=windows ARCH=x86 | |
make -j8 debug ARCH=x86 | |
make -j8 debug PLATFORM=windows ARCH=x86 | |
make -j8 release ARCH=x86_64 | |
make -j8 release PLATFORM=windows ARCH=x86_64 | |
make -j8 debug ARCH=x86_64 | |
make -j8 debug PLATFORM=windows ARCH=x86_64 | |
# - name: Get wine32-development package | |
# run: | | |
# sudo dpkg --add-architecture i386 && sudo apt-get update && sudo apt-get install -y wine32-development | |
# - name: Build QVM using wine | |
# run: | | |
# wine cmd /c build.bat | |
- name: Build QVM | |
run: | | |
sudo chmod 777 tools/bin/linux/* # make all of them executable | |
make -f MakefileQVM -j8 | |
env: | |
ARCHIVE: 1 | |
- name: Store QVM artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: QVMs | |
path: | | |
*.pk3 | |
if-no-files-found: error | |
retention-days: 5 | |
- name: Store Linux x86 .so artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: linux-x86 | |
path: | | |
build/release-linux-x86 | |
build/debug-linux-x86 | |
if-no-files-found: error | |
retention-days: 5 | |
- name: Store Linux x86_64 .so artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: linux-x86_64 | |
path: | | |
build/release-linux-x86_64 | |
build/debug-linux-x86_64 | |
if-no-files-found: error | |
retention-days: 5 | |
- name: Store Windows x86 DLL artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: windows-x86 | |
path: | | |
build/release-windows-x86 | |
build/debug-windows-x86 | |
if-no-files-found: error | |
retention-days: 5 | |
- name: Store Windows x86_64 DLL artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: windows-x86_64 | |
path: | | |
build/release-windows-x86_64 | |
build/debug-windows-x86_64 | |
if-no-files-found: error | |
retention-days: 5 | |
- name: Publish a release | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
files: | | |
*.pk3 | |
build/* |