Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Browse files Browse the repository at this point in the history
  • Loading branch information
csnv committed Feb 29, 2024
2 parents 639581a + 4e38e66 commit 1f25263
Show file tree
Hide file tree
Showing 16 changed files with 377 additions and 62 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/controller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,11 @@ jobs:
needs: build
if: ${{ !failure() && !cancelled() }}
uses: ./.github/workflows/mysql.yml
macos_latest:
needs: build
if: ${{ !failure() && !cancelled() }}
uses: ./.github/workflows/macos_latest.yml
macos_m1:
needs: build
if: ${{ !failure() && !cancelled() }}
uses: ./.github/workflows/macos_m1.yml
81 changes: 81 additions & 0 deletions .github/workflows/macos_latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: macos_latest

on: workflow_call

env:
MYSQL_DATABASE: 'ragnarok'
MYSQL_USER: 'ragnarok'
MYSQL_PASSWORD: 'ragnarok'
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
MACOS_COMMON_PACKAGES: make zlib pcre mysql mysql-client mysql-connector-c
SQLHOST: 'localhost'

jobs:
build:
runs-on: macos-latest
timeout-minutes: 60
strategy:
matrix:
CC: [clang]
RENEWAL: ["", "--disable-renewal"]
CLIENT_TYPE: ["", "--enable-packetver-re", "--enable-packetver-zero"]
HTTPLIB: ["", "--with-http_parser=llhttp"]
SANITIZER: ["--disable-manager", "--disable-manager --enable-sanitize=full"]
PACKET_VERSION: ["--enable-packetver=20221024", "--enable-packetver=20130724"]
exclude:
- PACKET_VERSION: "--enable-packetver=20130724"
CLIENT_TYPE: "--enable-packetver-zero"

# github.head_ref will stop previous runs in the same PR (if in a PR)
# github.run_id is a fallback when outside a PR (e.g. every merge in master will run, and previous won't stop)
concurrency:
group: macos-x64-${{ github.head_ref || github.run_id }}_${{ matrix.CC }}_${{ matrix.RENEWAL }}_${{ matrix.CLIENT_TYPE }}_${{ matrix.HTTPLIB }}_${{ matrix.SANITIZER }}_${{ matrix.PACKET_VERSION}}
cancel-in-progress: true

env:
CC: ${{ matrix.CC }}
CONFIGURE_FLAGS: CC=${{ matrix.CC }} --enable-debug --enable-Werror --enable-buildbot ${{ matrix.RENEWAL }} ${{ matrix.HTTPLIB }} ${{ matrix.CLIENT_TYPE }} ${{ matrix.SANITIZER }} ${{ matrix.PACKET_VERSION }}
PACKET_VERSION: ${{ matrix.PACKET_VERSION }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1

- name: info
run: |
uname -a
- name: prepare the build environment
run: |
echo "CPPFLAGS=-I$(brew --prefix)/include" >> $GITHUB_ENV
echo "LDFLAGS=-L$(brew --prefix)/lib" >> $GITHUB_ENV
- name: install packages
run: |
brew update || true
./tools/ci/retry.sh brew install $MACOS_COMMON_PACKAGES
- name: setup mysql server
run: |
brew services start mysql
./tools/ci/retry.sh mysqladmin ping --silent
./tools/ci/travis.sh createdb $MYSQL_DATABASE root
./tools/ci/travis.sh adduser $MYSQL_DATABASE $MYSQL_USER $MYSQL_PASSWORD root '' $SQLHOST
./tools/ci/travis.sh importdb $MYSQL_DATABASE root
- name: get plugins
run: |
./tools/ci/travis.sh getplugins || true
- name: build
run: |
./tools/ci/travis.sh build $CONFIGURE_FLAGS --with-mysql=$(brew --prefix mysql)/bin/mysql_config
- name: test
run: |
./tools/ci/travis.sh test ragnarok ragnarok ragnarok $SQLHOST
- name: extra test
if: env.PACKET_VERSION != '--enable-packetver=20130724'
run: |
./tools/ci/travis.sh extratest
81 changes: 81 additions & 0 deletions .github/workflows/macos_m1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: macos_m1

on: workflow_call

env:
MYSQL_DATABASE: 'ragnarok'
MYSQL_USER: 'ragnarok'
MYSQL_PASSWORD: 'ragnarok'
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
MACOS_COMMON_PACKAGES: make zlib pcre mysql mysql-client mysql-connector-c
SQLHOST: 'localhost'

jobs:
build:
runs-on: macos-14
timeout-minutes: 60
strategy:
matrix:
CC: [clang]
RENEWAL: ["", "--disable-renewal"]
CLIENT_TYPE: ["", "--enable-packetver-re", "--enable-packetver-zero"]
HTTPLIB: ["", "--with-http_parser=llhttp"]
SANITIZER: ["--disable-manager", "--disable-manager --enable-sanitize=full"]
PACKET_VERSION: ["--enable-packetver=20221024", "--enable-packetver=20130724"]
exclude:
- PACKET_VERSION: "--enable-packetver=20130724"
CLIENT_TYPE: "--enable-packetver-zero"

# github.head_ref will stop previous runs in the same PR (if in a PR)
# github.run_id is a fallback when outside a PR (e.g. every merge in master will run, and previous won't stop)
concurrency:
group: macos-arm-${{ github.head_ref || github.run_id }}_${{ matrix.CC }}_${{ matrix.RENEWAL }}_${{ matrix.CLIENT_TYPE }}_${{ matrix.HTTPLIB }}_${{ matrix.SANITIZER }}_${{ matrix.PACKET_VERSION}}
cancel-in-progress: true

env:
CC: ${{ matrix.CC }}
CONFIGURE_FLAGS: CC=${{ matrix.CC }} --enable-debug --enable-Werror --enable-buildbot ${{ matrix.RENEWAL }} ${{ matrix.HTTPLIB }} ${{ matrix.CLIENT_TYPE }} ${{ matrix.SANITIZER }} ${{ matrix.PACKET_VERSION }}
PACKET_VERSION: ${{ matrix.PACKET_VERSION }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1

- name: info
run: |
uname -a
- name: prepare the build environment
run: |
echo "CPPFLAGS=-I$(brew --prefix)/include" >> $GITHUB_ENV
echo "LDFLAGS=-L$(brew --prefix)/lib" >> $GITHUB_ENV
- name: install packages
run: |
brew update || true
./tools/ci/retry.sh brew install $MACOS_COMMON_PACKAGES
- name: setup mysql server
run: |
brew services start mysql
./tools/ci/retry.sh mysqladmin ping --silent
./tools/ci/travis.sh createdb $MYSQL_DATABASE root
./tools/ci/travis.sh adduser $MYSQL_DATABASE $MYSQL_USER $MYSQL_PASSWORD root '' $SQLHOST
./tools/ci/travis.sh importdb $MYSQL_DATABASE root
- name: get plugins
run: |
./tools/ci/travis.sh getplugins || true
- name: build
run: |
./tools/ci/travis.sh build $CONFIGURE_FLAGS --with-mysql=$(brew --prefix mysql)/bin/mysql_config
- name: test
run: |
./tools/ci/travis.sh test ragnarok ragnarok ragnarok $SQLHOST
- name: extra test
if: env.PACKET_VERSION != '--enable-packetver=20130724'
run: |
./tools/ci/travis.sh extratest
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,32 @@ If you are reading this in a text editor, simply ignore this section
### Removed
-->

## [v2024.02] `February 2024`

### Added

- Added GitHub Actions CI builds on macOS (Intel and ARM). (#3281)

### Changed

- Renamed the arguments of the `aMalloc()`, `aCalloc()`, `aStrndup()`, `aRealloc()`, `aReallocz()` macros to make it harder to accidentally swap their order. (#3280)

### Fixed

- Fixed `expandinventory()` not allowing to return to the initial minimum inventory size. (#3270)
- Fixed a race condition allowing for a call to `clif->pLoadEndAck()` before the client's loadendack is received. (#3277)
- Fixed a memory leak of emblem data when guilds are unloaded or disbanded. (#3278)
- Fixed several instances of swapped arguments in `aCalloc()` calls, causing warnings in gcc-14. (#3280)
- Fixed a regression causing AutoSpell not to replace the selected skill when the new skill has lower level than the previous one. (#3282)

### Deprecated

### Removed

### Other

- Updated copyright headers for year 2024.

## [v2023.12] `December 2023`

### Added
Expand Down Expand Up @@ -2991,6 +3017,7 @@ Note: everything included in this release is part of PR #3198 which consists of
- New versioning scheme and project changelogs/release notes (#1853)

[Unreleased]: https://github.com/HerculesWS/Hercules/compare/stable...master
[v2024.02]: https://github.com/HerculesWS/Hercules/compare/v2023.12...v2024.02
[v2023.12]: https://github.com/HerculesWS/Hercules/compare/v2023.11...v2023.12
[v2023.11]: https://github.com/HerculesWS/Hercules/compare/v2023.10...v2023.11
[v2023.10]: https://github.com/HerculesWS/Hercules/compare/v2023.08...v2023.10
Expand Down
Loading

0 comments on commit 1f25263

Please sign in to comment.