Skip to content

disable optimization in debug builds #67

disable optimization in debug builds

disable optimization in debug builds #67

Workflow file for this run

name: Release Version
on:
push:
branches:
- master
jobs:
build_script:
name: Build single-file Script
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
path: 'tiki_build'
- uses: actions/checkout@v4
with:
repository: 'premake/premake-core'
path: 'premake'
- name: Build Premake
run: |
cd premake
make -f Bootstrap.mak linux
cd ..
- name: Generate script
run: |
cd tiki_build
../premake/bin/release/premake5 generate
echo "Script generation successful for build $build_id"
cd ..
- uses: actions/upload-artifact@v4
with:
name: script
path: tiki_build/tiki_build.lua
build_executable:
name: Build Executables
needs: build_script
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
- os: ubuntu-latest
- os: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
path: 'tiki_build'
- uses: actions/checkout@v4
with:
repository: 'premake/premake-core'
path: 'premake'
- uses: actions/download-artifact@v4
with:
name: script
path: premake
- name: Patch Premake
run: |
cd premake
git apply ../tiki_build/premake5_tiki_build.patch
cd ..
- name: Build Premake Linux
if: matrix.config.os != 'windows-latest'
run: |
cd premake
make -f Bootstrap.mak linux
cd ..
echo "output_name=exe_linux" >> $GITHUB_ENV
echo "output_path=premake/bin/release/premake_tb" >> $GITHUB_ENV
- name: Build Premake Windows
if: matrix.config.os == 'windows-latest'
run: |
cd premake
.\Bootstrap.bat
cd ..
echo "output_name=exe_windows" >> $env:GITHUB_ENV
echo "output_path=premake/bin/release/premake_tb.exe" >> $env:GITHUB_ENV
- uses: actions/upload-artifact@v4
with:
name: ${{ env.output_name }}
path: ${{ env.output_path }}
create_release:
name: Create release
needs: build_executable
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
path: 'tiki_build'
- name: Write release info
run: |
cd tiki_build
build_id=$(git rev-list --count HEAD)
build_message=$(git log --format=%B -n 1 ${{ github.sha }})
echo "build_id=$build_id" >> $GITHUB_ENV
cd ..
echo "System Script and Executable release of ${{ github.sha }}" >> release_body.txt
echo "" >> release_body.txt
echo "Changes:" >> release_body.txt
echo "$build_message" >> release_body.txt
- uses: actions/download-artifact@v4
with:
name: script
- uses: actions/download-artifact@v4
with:
name: exe_linux
- uses: actions/download-artifact@v4
with:
name: exe_windows
- name: Create Release
id: create_release
uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag: v${{ env.build_id }}
name: Release ${{ env.build_id }}
bodyFile: release_body.txt
artifacts: "tiki_build.lua,premake_tb,premake_tb.exe"