summaryrefslogtreecommitdiff
path: root/.github/workflows/mariadb.yml
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2020-06-16 03:40:09 +0300
committerAndrei Karas <akaras@inbox.ru>2020-06-16 03:40:09 +0300
commit9b89425550094f51d633e5b5d6e86af65bffbf39 (patch)
tree42ae13b8bf0fdb49d5c5a4a976ad112a5db5a8a9 /.github/workflows/mariadb.yml
parent9a06857cc3ad2ad8f00b52ccc33f6c07342ad985 (diff)
downloadhercules-9b89425550094f51d633e5b5d6e86af65bffbf39.tar.gz
hercules-9b89425550094f51d633e5b5d6e86af65bffbf39.tar.bz2
hercules-9b89425550094f51d633e5b5d6e86af65bffbf39.tar.xz
hercules-9b89425550094f51d633e5b5d6e86af65bffbf39.zip
Add github actions
master branch may fail on this actions, but this push need because, actions not works in pull requests until not enabled in branch.
Diffstat (limited to '.github/workflows/mariadb.yml')
-rw-r--r--.github/workflows/mariadb.yml69
1 files changed, 69 insertions, 0 deletions
diff --git a/.github/workflows/mariadb.yml b/.github/workflows/mariadb.yml
new file mode 100644
index 000000000..4479e9e4d
--- /dev/null
+++ b/.github/workflows/mariadb.yml
@@ -0,0 +1,69 @@
+name: mariadb
+
+on: [push, pull_request]
+
+env:
+ MYSQL_DATABASE: 'ragnarok'
+ MYSQL_USER: 'ragnarok'
+ MYSQL_PASSWORD: 'ragnarok'
+ MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
+ DEBIAN_COMMON_PACKAGES: make zlib1g-dev libpcre3-dev git python
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ CC: [gcc]
+ RENEWAL: [""]
+ CLIENT_TYPE: [""]
+ SANITIZER: ["--disable-manager", "--enable-sanitize=full"]
+ PACKET_VERSION: ["--enable-packetver=20200304"]
+ MYSQL: ["10.1", "10.5", "latest"]
+ container:
+ image: debian:unstable
+ services:
+ mysql:
+ image: mariadb:${{ matrix.MYSQL }}
+ ports:
+ - 33306:3306
+ env:
+ MYSQL_DATABASE: 'ragnarok'
+ MYSQL_USER: 'ragnarok'
+ MYSQL_PASSWORD: 'ragnarok'
+ MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
+ options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
+ env:
+ INSTALL_PACKAGES: ${{ matrix.CC }} mariadb-client libmariadbclient-dev-compat
+ SQLHOST: mysql
+ CC: ${{ matrix.CC }}
+ CONFIGURE_FLAGS: CC=${{ matrix.CC }} --enable-debug --enable-Werror --enable-buildbot ${{ matrix.RENEWAL }} ${{ matrix.CLIENT_TYPE }} ${{ matrix.SANITIZER }} ${{ matrix.PACKET_VERSION }}
+ steps:
+ - uses: actions/checkout@v1
+ with:
+ fetch-depth: 1
+
+ - name: info
+ run: |
+ uname -a
+
+ - name: install packages
+ run: |
+ ./tools/ci/retry.sh apt-get update
+ ./tools/ci/retry.sh apt-get install -y -qq $INSTALL_PACKAGES $DEBIAN_COMMON_PACKAGES
+
+ - name: init database
+ run: |
+ ./tools/ci/travis.sh importdb ragnarok ragnarok ragnarok $SQLHOST
+
+ - name: get plugins
+ run: |
+ ./tools/ci/travis.sh getplugins || true
+
+ - name: build
+ run: |
+ ./tools/ci/travis.sh build $CONFIGURE_FLAGS
+
+ - name: test
+ run: |
+ ./tools/ci/travis.sh test ragnarok ragnarok ragnarok $SQLHOST