Corrections in Item DB. (#7928) #13
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: Validate NPC Scripts and DB Changes | |
# npc_db_validation.yml | |
# For NPC and DB validation we only need two builds: one of Renewal and one for Pre-Renewal checks. | |
# NPC scripts and database files are not platform dependent, so we can achieve this validation using only a simple linux setup. | |
concurrency: | |
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
pull_request: | |
paths: | |
# Always trigger all Github Actions if an action or something CI related was changed | |
- '.github/workflows/**' | |
- 'tools/ci/**' | |
# This workflow should run when a file in either the db/ or npc/ directory has been modified. | |
- 'db/**' | |
- 'npc/**' | |
jobs: | |
build: | |
# Github Actions checks for '[ci skip]', '[skip ci]', '[no ci]', '[skip actions]', or '[actions skip]' but not a hyphenated version. | |
# It's a catch-all incase a Pull Request has been opened and someone is on auto-pilot. | |
if: "!contains(github.event.head_commit.message, 'ci-skip')" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# The ubuntu-latest label currently points to ubuntu-22.04. | |
# Available: ubuntu-22.04, ubuntu-20.04 | |
os: [ubuntu-latest] | |
# Only a single version of GCC is required for validating NPC scripts and database changes. | |
gcc: ['11'] | |
# We run build checks for both Renewal and PRE-Renewal | |
mode: ['PRE', 'RE'] | |
steps: | |
- uses: actions/checkout@v2 | |
# A simple 'yes' and 'no' can be confusing, so we use names to display in the current job then convert them for use in the compiler. | |
- name: Variable Parsing - PRE | |
if: ${{ matrix.mode == 'PRE' }} | |
run: | | |
echo "PRERE=yes" >> $GITHUB_ENV | |
- name: Variable Parsing - RE | |
if: ${{ matrix.mode == 'RE' }} | |
run: | | |
echo "PRERE=no" >> $GITHUB_ENV | |
- name: Update & Install packages | |
# Ubuntu runners already have most of the packages rAthena requires to build. | |
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md | |
run: | | |
sudo apt update | |
sudo apt install zlib1g-dev libpcre3-dev gcc-${{ matrix.gcc }} g++-${{ matrix.gcc }} | |
- name: Start MySQL | |
run: sudo systemctl start mysql.service | |
- name: Setup Database and import table data | |
run: ./tools/ci/sql.sh | |
- name: Command - configure | |
env: | |
CONFIGURE_FLAGS: 'CC=gcc-${{ matrix.gcc }} CXX=g++-${{ matrix.gcc }} --enable-prere=${{ env.PRERE }} --enable-buildbot=yes' | |
run: ./configure $CONFIGURE_FLAGS | |
# npc.sh enables all NPC scripts in the custom and test folders. | |
- name: Enable All NPCs for Testing | |
run: ./tools/ci/npc.sh | |
- name: Command - make clean | |
run: make clean | |
# Create import directories | |
- name: Command - make import | |
run: make import | |
- name: Command - make map | |
run: make map | |
- name: Run Once - map-server | |
run: ./map-server --run-once |