--- kind: pipeline type: docker name: EQEmulator Server Linux CI # Limits how many of these builds can run on the drone runner at a time, this isn't about cores concurrency: limit: 1 volumes: - name: cache host: path: /var/lib/cache steps: - name: server-build # Source build script https://github.com/Akkadius/akk-stack/blob/master/containers/eqemu-server/Dockerfile#L20 image: akkadius/eqemu-server:v11 commands: - sudo chown eqemu:eqemu /drone/src/ * -R - sudo chown eqemu:eqemu /home/eqemu/.ccache/ * -R - git submodule init && git submodule update && mkdir -p build && cd build && cmake -DEQEMU_BUILD_TESTS=ON -DEQEMU_BUILD_LOGIN=ON -DEQEMU_BUILD_LUA=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="-O0 -g -DNDEBUG" -G 'Unix Makefiles' .. && make -j$((`nproc`-4)) - curl https://raw.githubusercontent.com/Akkadius/eqemu-install-v2/master/eqemu_config.json --output eqemu_config.json - ./bin/tests volumes: - name: cache path: /home/eqemu/.ccache/ # remove this when merge trigger: branch: - noop event: - push --- kind: pipeline type: docker name: Build Linux Binaries # Limits how many of these builds can run on the drone runner at a time, this isn't about cores concurrency: limit: 1 volumes: - name: cache host: path: /var/lib/cache steps: - name: Init image: akkadius/eqemu-server:v11 commands: - sudo chown eqemu:eqemu /drone/src/ * -R - sudo chown eqemu:eqemu /home/eqemu/.ccache/ * -R - git submodule init && git submodule update && mkdir -p build && cd build && cmake -DEQEMU_BUILD_TESTS=ON -DEQEMU_BUILD_LOGIN=ON -DEQEMU_ENABLE_BOTS=ON -DEQEMU_BUILD_LUA=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="-O0 -g -DNDEBUG" -G 'Unix Makefiles' .. - curl https://raw.githubusercontent.com/Akkadius/eqemu-install-v2/master/eqemu_config.json --output eqemu_config.json volumes: - name: cache path: /home/eqemu/.ccache/ - name: Linux x64 image: akkadius/eqemu-server:v11 commands: - cd build && cmake -DEQEMU_BUILD_TESTS=ON -DEQEMU_BUILD_LOGIN=ON -DEQEMU_ENABLE_BOTS=OFF -DEQEMU_BUILD_LUA=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="-O0 -g -DNDEBUG" -G 'Unix Makefiles' .. && make -j$((`nproc`-4)) - curl https://raw.githubusercontent.com/Akkadius/eqemu-install-v2/master/eqemu_config.json --output eqemu_config.json - ./bin/tests volumes: - name: cache path: /home/eqemu/.ccache/ - name: Linux x64 Bots image: akkadius/eqemu-server:v11 commands: - git submodule init && git submodule update && mkdir -p build-bots && cd build-bots && cmake -DEQEMU_BUILD_TESTS=ON -DEQEMU_BUILD_LOGIN=ON -DEQEMU_ENABLE_BOTS=ON -DEQEMU_BUILD_LUA=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="-O0 -g -DNDEBUG" -G 'Unix Makefiles' .. && make -j$((`nproc`-4)) - curl https://raw.githubusercontent.com/Akkadius/eqemu-install-v2/master/eqemu_config.json --output eqemu_config.json - ./bin/tests volumes: - name: cache path: /home/eqemu/.ccache/ - name: Package Artifacts image: akkadius/eqemu-server:v11 commands: - zip -j eqemu-server-linux-x64.zip ./build/bin/* - zip -j eqemu-server-linux-bots-x64.zip ./build-bots/bin/* - ls -lsh | grep zip volumes: - name: cache path: /home/eqemu/.ccache/ - name: Upload Artifacts image: akkadius/eqemu-build-releaser:v2 environment: RCLONE_CONFIG_REMOTE_TYPE: ftp RCLONE_FTP_HOST: drone.akkadius.com RCLONE_FTP_USER: artifacts RCLONE_FTP_PASS: from_secret: RCLONE_FTP_PASS commands: - rclone config create remote ftp env_auth true > /dev/null - | rclone copy eqemu-server-linux-x64.zip remote: - | rclone copy eqemu-server-linux-bots-x64.zip remote: - | rclone ls remote: trigger: branch: - akkadius/build-testt event: - push --- kind: pipeline type: exec name: Build Windows Binaries platform: os: windows arch: amd64 steps: - name: init commands: - git submodule init - git submodule update - name: Windows x64 commands: - utils/scripts/build/windows-build-no-bots.ps1 - name: Windows x64 Bots commands: - utils/scripts/build/windows-build-bots.ps1 - name: Package Artifacts commands: - utils/scripts/build/package-artifacts.ps1 - dir *.zip - name: Upload Artifacts environment: RCLONE_CONFIG_REMOTE_TYPE: ftp RCLONE_FTP_HOST: drone.akkadius.com RCLONE_FTP_USER: artifacts RCLONE_FTP_PASS: from_secret: RCLONE_FTP_PASS commands: - rclone config create remote ftp env_auth true - | rclone copy eqemu-server-windows-x64.zip remote: - | rclone copy eqemu-server-windows-bots-x64.zip remote: - | rclone ls remote: trigger: branch: - akkadius/build-testt event: - push --- kind: pipeline type: docker name: Publish Artifacts to Github steps: - name: Upload Artifacts image: akkadius/eqemu-build-releaser:v2 environment: RCLONE_CONFIG_REMOTE_TYPE: ftp RCLONE_FTP_HOST: drone.akkadius.com RCLONE_FTP_USER: artifacts RCLONE_FTP_PASS: from_secret: RCLONE_FTP_PASS GH_RELEASE_GITHUB_API_TOKEN: from_secret: GH_RELEASE_GITHUB_API_TOKEN commands: - rclone config create remote ftp env_auth true > /dev/null - | rclone copy remote:* . - gh-release --assets=eqemu-server-linux-x64.zip,eqemu-server-linux-bots-x64.zip,eqemu-server-windows-x64.zip,eqemu-server-windows-bots-x64.zip -y #depends_on: # - Build Windows Binaries # - Build Linux Binaries