Skip to content

Fix README

Fix README #115

Workflow file for this run

name: Build Porytiles
on:
push:
branches: [ "trunk" ]
tags: '*'
pull_request:
branches: [ "trunk" ]
jobs:
build-linux:
name: Build on ubuntu-latest
runs-on: ubuntu-latest
steps:
- name: Install GCC 13
run: |
sudo apt-get update
sudo apt-get install zlib1g-dev
sudo apt-get install libpng-dev
sudo apt-get install g++-13
g++-13 --version
- name: Checkout porytiles
uses: actions/checkout@v3
- name: Build debug and release executables
run: |
CXX=g++-13 make all
- name: Run tests on debug and release
run: |
CXX=g++-13 make check
- name: Build release executable before release
if: startsWith(github.ref, 'refs/tags/')
run: |
CXX=g++-13 make release
- name: Run release tests before release
if: startsWith(github.ref, 'refs/tags/')
run: |
CXX=g++-13 make release-check
- name: Prep release directory before release
if: startsWith(github.ref, 'refs/tags/')
run : |
mkdir porytiles-linux
cp release/bin/porytiles porytiles-linux
cp CHANGELOG.md porytiles-linux
cp README.md porytiles-linux
cp LICENSE porytiles-linux
cp -r res porytiles-linux
- name: Bundle release directory before release
uses: montudor/action-zip@v0.1.0
if: startsWith(github.ref, 'refs/tags/')
with:
args: zip -r porytiles-linux.zip porytiles-linux
- name: Create release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: porytiles-linux.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-macos:
name: Build on macos-latest-x86_64
runs-on: macos-latest
steps:
- name: Install LLVM 16 and dependencies
run: |
brew update
brew install zlib
brew install libpng
brew install llvm@16
/usr/local/opt/llvm/bin/clang++ --version
- name: Checkout porytiles
uses: actions/checkout@v3
- name: Build debug and release executables
run: |
LDFLAGS='-L/usr/local/opt/llvm/lib/c++ -Wl,-rpath,/usr/local/opt/llvm/lib/c++' CXX_FLAGS='-I/usr/local/opt/llvm/include/c++/v1' CXX=/usr/local/opt/llvm/bin/clang++ make all
- name: Run tests on debug and release
run: |
LDFLAGS='-L/usr/local/opt/llvm/lib/c++ -Wl,-rpath,/usr/local/opt/llvm/lib/c++' CXX_FLAGS='-I/usr/local/opt/llvm/include/c++/v1' CXX=/usr/local/opt/llvm/bin/clang++ make check
- name: Build release executable before release
if: startsWith(github.ref, 'refs/tags/')
run: |
LDFLAGS='-L/usr/local/opt/llvm/lib/c++ -Wl,-rpath,/usr/local/opt/llvm/lib/c++' CXX_FLAGS='-I/usr/local/opt/llvm/include/c++/v1' CXX=/usr/local/opt/llvm/bin/clang++ make release
- name: Run release tests before release
if: startsWith(github.ref, 'refs/tags/')
run: |
LDFLAGS='-L/usr/local/opt/llvm/lib/c++ -Wl,-rpath,/usr/local/opt/llvm/lib/c++' CXX_FLAGS='-I/usr/local/opt/llvm/include/c++/v1' CXX=/usr/local/opt/llvm/bin/clang++ make release-check
- name: Prep release directory before release
if: startsWith(github.ref, 'refs/tags/')
run : |
mkdir porytiles-macos-x86_64
cp release/bin/porytiles porytiles-macos-x86_64
cp CHANGELOG.md porytiles-macos-x86_64
cp README.md porytiles-macos-x86_64
cp LICENSE porytiles-macos-x86_64
cp -r res porytiles-macos-x86_64
- name: Bundle release directory before release
if: startsWith(github.ref, 'refs/tags/')
run: |
zip -r porytiles-macos-x86_64.zip porytiles-macos-x86_64
- name: Create release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: porytiles-macos-x86_64.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}