Skip to content

Commit

Permalink
Merge pull request #67 from grunt-lucas/fix-ci
Browse files Browse the repository at this point in the history
Update GitHub workflows
  • Loading branch information
grunt-lucas authored Oct 22, 2024
2 parents 6a12ea7 + 78bbbd5 commit f0c321e
Show file tree
Hide file tree
Showing 7 changed files with 143 additions and 94 deletions.
101 changes: 8 additions & 93 deletions .github/workflows/dev_build.yml
Original file line number Diff line number Diff line change
@@ -1,101 +1,16 @@
name: Porytiles PR / Develop Build
name: Porytiles Develop Branch Build
on:
pull_request:
branches: [ "develop" ]
push:
branches: [ "develop" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build-linux-amd64-clang-llvm:
name: Build on linux-amd64 with clang
runs-on: ubuntu-latest
steps:
- name: Install Clang+LLVM 16 and other build dependencies
run: |
sudo apt-get update
sudo apt-get install zlib1g-dev
sudo apt-get install libpng-dev
sudo apt-get install cmake
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 16 all
clang++-16 --version
clang++-16 -v
- name: Checkout porytiles
uses: actions/checkout@v3

- name: Build the project
run: |
export CXX=clang++-16
cmake -B build
cd build
cmake --build .
- name: Run test suite
run: |
./build/Porytiles-1.x/tests/Porytiles1xTestSuite
build-linux-amd64-clang:
uses: ./.github/workflows/templates/linux_amd64_clang.yml
build-linux-amd64-gcc:
name: Build on linux-amd64 with gcc
# As of 14-Jun-2024 need ubuntu-24.04 since GitHub removed GCC13 from ubuntu-latest
# https://github.com/actions/runner-images/issues/9866
# TODO : move to GCC 14?
runs-on: ubuntu-24.04
steps:
- name: Install GCC 13 and dependencies
run: |
sudo apt-get update
sudo apt-get install zlib1g-dev
sudo apt-get install libpng-dev
sudo apt-get install cmake
sudo apt-get install g++-13
g++-13 --version
g++-13 -v
- name: Checkout porytiles
uses: actions/checkout@v3

- name: Build the project
run: |
export CXX=g++-13
cmake -B build
cd build
cmake --build .
- name: Run test suite
run: |
./build/Porytiles-1.x/tests/Porytiles1xTestSuite
build-macos-arm64-clang-llvm:
name: Build on macos-arm64 with clang
runs-on: macos-latest
# GitHub removed Intel Mac runners, so macos-latest is now arm64
# We don't need to install zlib since it is shipped with macOS, CMake will find it
steps:
- name: Install Clang+LLVM 16 and dependencies
run: |
brew update
brew install libpng || true
brew install cmake || true
brew install llvm@16 || true
/opt/homebrew/opt/llvm@16/bin/clang++ --version
/opt/homebrew/opt/llvm@16/bin/clang++ -v
- name: Checkout porytiles
uses: actions/checkout@v3

# Use -DCMAKE_FIND_FRAMEWORK=NEVER, otherwise CMake sometimes picks up outdated
# package versions deeply buried in some ancient macOS system framework
- name: Build the project
run: |
export CXX=/opt/homebrew/opt/llvm@16/bin/clang++
cmake -DCMAKE_FIND_FRAMEWORK=NEVER -B build
cd build
cmake --build .
- name: Run test suite
run: |
./build/Porytiles-1.x/tests/Porytiles1xTestSuite
uses: ./.github/workflows/templates/linux_amd64_gcc.yml
build-macos-arm64-clang:
uses: ./.github/workflows/templates/macos_arm64_clang.yml
build-macos-arm64-gcc:
uses: ./.github/workflows/templates/macos_arm64_gcc.yml
10 changes: 10 additions & 0 deletions .github/workflows/pr_dev_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Porytiles PR Build
on:
pull_request:
branches: [ "develop" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build-linux-amd64-clang:
uses: ./.github/workflows/templates/linux_amd64_clang.yml
31 changes: 31 additions & 0 deletions .github/workflows/templates/linux_amd64_clang.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Linux AMD64 Clang Reusable Build Workflow

jobs:
build-linux-amd64-clang:
name: Build on linux-amd64 with clang
runs-on: ubuntu-latest
steps:
- name: Install Clang+LLVM 16 and other build dependencies
run: |
sudo apt-get update
sudo apt-get install zlib1g-dev
sudo apt-get install libpng-dev
sudo apt-get install cmake
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 16 all
clang++-16 --version
- name: Checkout porytiles
uses: actions/checkout@v3

- name: Build the project
run: |
export CXX=clang++-16
cmake -B build
cd build
cmake --build .
- name: Run test suite
run: |
./build/Porytiles-1.x/tests/Porytiles1xTestSuite
29 changes: 29 additions & 0 deletions .github/workflows/templates/linux_amd64_gcc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Linux AMD64 GCC Reusable Build Workflow

jobs:
build-linux-amd64-gcc:
name: Build on linux-amd64 with gcc
runs-on: ubuntu-latest
steps:
- name: Install GCC and other build dependencies
run: |
sudo apt-get update
sudo apt-get install zlib1g-dev
sudo apt-get install libpng-dev
sudo apt-get install cmake
sudo apt-get install g++
g++-14 --version
- name: Checkout porytiles
uses: actions/checkout@v3

- name: Build the project
run: |
export CXX=g++-14
cmake -B build
cd build
cmake --build .
- name: Run test suite
run: |
./build/Porytiles-1.x/tests/Porytiles1xTestSuite
32 changes: 32 additions & 0 deletions .github/workflows/templates/macos_arm64_clang.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: macOS ARM64 Clang Reusable Build Workflow

jobs:
build-macos-arm64-clang:
name: Build on macos-arm64 with clang
runs-on: macos-latest
# GitHub removed Intel Mac runners, so macos-latest is now arm64
# We don't need to install zlib since it is shipped with macOS, CMake will find it
steps:
- name: Install Clang+LLVM 16 and other build dependencies
run: |
brew update
brew install libpng || true
brew install cmake || true
brew install llvm@16 || true
/opt/homebrew/opt/llvm@16/bin/clang++ --version
- name: Checkout porytiles
uses: actions/checkout@v3

# Use -DCMAKE_FIND_FRAMEWORK=NEVER, otherwise CMake sometimes picks up outdated
# package versions deeply buried in some ancient macOS system framework
- name: Build the project
run: |
export CXX=/opt/homebrew/opt/llvm@16/bin/clang++
cmake -DCMAKE_FIND_FRAMEWORK=NEVER -B build
cd build
cmake --build .
- name: Run test suite
run: |
./build/Porytiles-1.x/tests/Porytiles1xTestSuite
32 changes: 32 additions & 0 deletions .github/workflows/templates/macos_arm64_gcc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: macOS ARM64 GCC Reusable Build Workflow

jobs:
build-macos-arm64-gcc:
name: Build on macos-arm64 with gcc
runs-on: macos-latest
# GitHub removed Intel Mac runners, so macos-latest is now arm64
# We don't need to install zlib since it is shipped with macOS, CMake will find it
steps:
- name: Install GCC and other build dependencies
run: |
brew update
brew install libpng || true
brew install cmake || true
brew install gcc
g++-14 --version
- name: Checkout porytiles
uses: actions/checkout@v3

# Use -DCMAKE_FIND_FRAMEWORK=NEVER, otherwise CMake sometimes picks up outdated
# package versions deeply buried in some ancient macOS system framework
- name: Build the project
run: |
export CXX=g++-14
cmake -DCMAKE_FIND_FRAMEWORK=NEVER -B build
cd build
cmake --build .
- name: Run test suite
run: |
./build/Porytiles-1.x/tests/Porytiles1xTestSuite
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Porytiles

[![Porytiles PR / Develop Build](https://github.com/grunt-lucas/porytiles/actions/workflows/dev_build.yml/badge.svg)](https://github.com/grunt-lucas/porytiles/actions/workflows/dev_build.yml)
[![Porytiles Develop Branch Build](https://github.com/grunt-lucas/porytiles/actions/workflows/dev_build.yml/badge.svg)](https://github.com/grunt-lucas/porytiles/actions/workflows/dev_build.yml)
[![Porytiles Nightly Release](https://github.com/grunt-lucas/porytiles/actions/workflows/nightly_release.yml/badge.svg)](https://github.com/grunt-lucas/porytiles/actions/workflows/nightly_release.yml)

Overworld tileset compiler for use with the [`pokeruby`](https://github.com/pret/pokeruby), [`pokefirered`](https://github.com/pret/pokefirered), and [`pokeemerald`](https://github.com/pret/pokeemerald) Pokémon Generation 3 decompilation projects from [`pret`](https://github.com/pret). Also compatible with [`pokeemerald-expansion`](https://github.com/rh-hideout/pokeemerald-expansion) from [`rh-hideout`](https://github.com/rh-hideout). Builds [Porymap](https://github.com/huderlem/porymap)-ready tilesets from RGBA (or indexed) tile assets.
Expand Down

0 comments on commit f0c321e

Please sign in to comment.