version: 2 defaults: &defaults working_directory: ~/ddnet/ddnet docker: - image: buildpack-deps:stretch defignore: &defignore filters: branches: ignore: - /.*\.tmp/ jobs: pre_test: <<: *defaults parallelism: 1 steps: - checkout - run: python scripts/check_header_guards.py build: <<: *defaults parallelism: 1 #environment: #CIRCLE_ARTIFACTS: /tmp/circleci-artifacts #CIRCLE_TEST_REPORTS: /tmp/circleci-test-results steps: - checkout #- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS - run: git submodule update --init - run: | apt-get update apt-get install -y build-essential \ python3 \ libcurl4-openssl-dev \ libfreetype6-dev \ libsdl2-dev \ libglew-dev \ libogg-dev \ libopus-dev \ libpnglite-dev \ libopusfile-dev \ libwavpack-dev \ libwebsockets-dev \ libmysqlcppconn-dev apt-get install -y cmake xz-utils # Compile - run: python scripts/check_header_guards.py - run: | mkdir build cd build env CFLAGS="-Wdeclaration-after-statement -Werror" CXXFLAGS="-Werror" cmake -DDOWNLOAD_GTEST=ON .. make everything make package_default mkdir -p /tmp/artifacts cp DDNet-*-linux_x86_64.tar.xz /tmp/artifacts - run: | mkdir noautoupdate cd noautoupdate env CFLAGS="-Wdeclaration-after-statement -Werror" CXXFLAGS="-Werror" cmake -DAUTOUPDATE=OFF -DDOWNLOAD_GTEST=ON .. make everything - run: | mkdir websockets cd websockets env CFLAGS="-Wdeclaration-after-statement -Werror" CXXFLAGS="-Werror" cmake -DWEBSOCKETS=ON -DDOWNLOAD_GTEST=ON .. make everything - run: | mkdir mysql cd mysql env CFLAGS="-Wdeclaration-after-statement -Werror" CXXFLAGS="-Werror" cmake -DDMYSQL=ON -DDOWNLOAD_GTEST=ON .. make everything - run: | mkdir bundled cd bundled env CFLAGS="-Wdeclaration-after-statement -Werror" CXXFLAGS="-Werror" cmake -DPREFER_BUNDLED_LIBS=ON -DDOWNLOAD_GTEST=ON .. make everything - store_artifacts: path: /tmp/artifacts - persist-to-workspace: root: ./ paths: ./* test: <<: *defaults steps: - attach-workspace: at: ./ - run: | apt-get update apt-get install -y make cmake xz-utils - run: | cd build make run_tests ./DDNet-Server shutdown - run: | cd noautoupdate make run_tests workflows: version: 2 build_and_test: jobs: - pre_test: <<: *defignore - build: <<: *defignore requires: - pre_test - test: <<: *defignore requires: - build