diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..46a94d4 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,4 @@ +{ + "name": "Bigfoot", + "image": "git.romainboullard.com/bigfootdev/linuxbigfootbuilder:main" +} diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..150bae3 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,46 @@ +name: Bigfoot + +on: + push: + branches: + - '**' + workflow_dispatch: + +env: + CCACHE_BASEDIR: ${{ github.workspace }} + +jobs: + build-and-test: + runs-on: ubuntu-latest + timeout-minutes: 120 + container: + image: git.romainboullard.com/bigfootdev/linuxbigfootbuilder:main + strategy: + matrix: + build_type: [Debug, RelWithDebInfo, Release] + unity_build: [True, False] + steps: + - name: Install Node.js + run: apt-get update && apt-get install -y nodejs + + - name: Checkout repository + uses: actions/checkout@v6 + with: + submodules: recursive + + - name: Show ccache stats before + run: ccache --zero-stats + + - name: Build + run: | + conan install . --deployer=full_deploy --deployer-folder=build --remote=bigfootpackages -pr:h=clang -pr:b=clang --build=missing -s build_type=${{ matrix.build_type }} -o bigfoot/*:unity_build=${{ matrix.unity_build }} -o bigfoot/*:build_tests=True -o bigfoot/*:sample_app=True -o bigfoot/*:tracy=False -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True -o bigfoot/*:build_benchmarks_lto=True -o bigfoot/*:render_doc=True + cmake -S . -B ./build/${{ matrix.build_type }} --toolchain ./build/${{ matrix.build_type }}/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -G "Ninja" + cmake --build build/${{ matrix.build_type }} --parallel $(nproc) + + - name: Test + run: | + cd ./build/${{ matrix.build_type }} + xvfb-run ctest . --output-on-failure + + - name: Show ccache stats after + run: ccache --show-stats \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 1a1570a..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,79 +0,0 @@ -include: '/CI/templates.yml' - -variables: - SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" - GIT_SUBMODULE_STRATEGY: recursive - GIT_DEPTH: "0" - -stages: - - build - - build-unity - - unit-tests - - sonar - -# ******************************************DEBUG****************************************** - -BuildDebug: - extends: .Build - variables: - BUILD_TYPE: 'Debug' - -BuildUnityDebug: - extends: .BuildUnity - variables: - BUILD_TYPE: 'Debug' - -UnitTestsDebug: - extends: .UnitTests - variables: - BUILD_TYPE: 'Debug' - needs: - - BuildUnityDebug - -# ******************************************RELWITHDEBINFO****************************************** - -BuildRelWithDebInfo: - extends: .Build - variables: - BUILD_TYPE: 'RelWithDebInfo' - -BuildUnityRelWithDebInfo: - extends: .BuildUnity - variables: - BUILD_TYPE: 'RelWithDebInfo' - -UnitTestsRelWithDebInfo: - extends: .UnitTests - variables: - BUILD_TYPE: 'RelWithDebInfo' - needs: - - BuildUnityRelWithDebInfo - -# ******************************************RELEASE****************************************** - -BuildRelease: - extends: .Build - variables: - BUILD_TYPE: 'Release' - -BuildUnityRelease: - extends: .BuildUnity - variables: - BUILD_TYPE: 'Release' - -UnitTestsRelease: - extends: .UnitTests - variables: - BUILD_TYPE: 'Release' - needs: - - BuildUnityRelease - -# ******************************************Sonar****************************************** - -SonarCloud: - extends: .SonarCloud - dependencies: [] - only: - - merge_requests - - main - - Development diff --git a/CI/templates.yml b/CI/templates.yml deleted file mode 100644 index ef818dd..0000000 --- a/CI/templates.yml +++ /dev/null @@ -1,121 +0,0 @@ -.Build: - variables: - BUILD_TYPE: 'Release' - CCACHE_BASEDIR: $CI_PROJECT_DIR - CCACHE_DIR: $CI_PROJECT_DIR/ccache - CCACHE_COMPILERCHECK: "content" - image: registry.gitlab.com/bigfootdev/docker/linuxbigfootbuilder:main - stage: build - before_script: - - ccache --zero-stats - script: - - conan install . --deployer=full_deploy --deployer-folder=build --remote=bigfootpackages -pr:h=clang -pr:b=clang --build=missing -s build_type=$BUILD_TYPE -o bigfoot/*:unity_build=False -o bigfoot/*:build_tests=True -o bigfoot/*:sample_app=True -o bigfoot/*:tracy=False -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True -o bigfoot/*:build_benchmarks_lto=True -o bigfoot/*:render_doc=True - - cmake -S . -B ./build/$BUILD_TYPE --toolchain ./build/$BUILD_TYPE/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -G "Ninja" - - cmake --build build/$BUILD_TYPE --parallel $(nproc) - after_script: - - ccache --show-stats - dependencies: [] - artifacts: - when: always - name: Build$BUILD_TYPE - paths: - - build/$BUILD_TYPE - expire_in: 1 week - cache: - - key: "$CI_JOB_NAME" - paths: - - $CCACHE_DIR - tags: - - linux - - c++ - - bigfootdev - -.BuildUnity: - variables: - BUILD_TYPE: 'Release' - CCACHE_BASEDIR: $CI_PROJECT_DIR - CCACHE_DIR: $CI_PROJECT_DIR/ccache - CCACHE_COMPILERCHECK: "content" - image: registry.gitlab.com/bigfootdev/docker/linuxbigfootbuilder:main - stage: build-unity - before_script: - - ccache --zero-stats - script: - - conan install . --deployer=full_deploy --deployer-folder=build --remote=bigfootpackages -pr:h=clang -pr:b=clang --build=missing -s build_type=$BUILD_TYPE -o bigfoot/*:unity_build=True -o bigfoot/*:build_tests=True -o bigfoot/*:sample_app=True -o bigfoot/*:tracy=False -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True -o bigfoot/*:build_benchmarks_lto=True -o bigfoot/*:render_doc=True - - cmake -S . -B ./build/$BUILD_TYPE --toolchain ./build/$BUILD_TYPE/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -G "Ninja" - - cmake --build build/$BUILD_TYPE --parallel $(nproc) - after_script: - - ccache --show-stats - dependencies: [] - artifacts: - when: always - name: Build$BUILD_TYPE - paths: - - build/$BUILD_TYPE - expire_in: 1 week - cache: - - key: "$CI_JOB_NAME" - paths: - - $CCACHE_DIR - tags: - - linux - - c++ - - bigfootdev - -.UnitTests: - variables: - BUILD_TYPE: 'Release' - image: registry.gitlab.com/bigfootdev/docker/linuxbigfootbuilder:main - stage: unit-tests - script: - - cd ./build/$BUILD_TYPE - - xvfb-run ctest . --output-on-failure - artifacts: - when: always - name: Test$BUILD_TYPE - paths: - - build/$BUILD_TYPE - reports: - junit: ./build/$BUILD_TYPE/TestResults/*.xml - tags: - - linux - - c++ - - bigfootdev - -.SonarCloud: - variables: - CCACHE_BASEDIR: $CI_PROJECT_DIR - CCACHE_DIR: $CI_PROJECT_DIR/ccache - CCACHE_COMPILERCHECK: "content" - image: registry.gitlab.com/bigfootdev/docker/linuxbigfootcoveragebuilder:main - stage: sonar - before_script: - - ccache --zero-stats - - curl -sSLo ./sonar-scanner.zip 'https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-7.2.0.5079-linux-x64.zip' - - unzip -o sonar-scanner.zip - - mv sonar-scanner-7.2.0.5079-linux-x64 sonar-scanner - - curl -sSLo ./build-wrapper-linux-x86.zip "${SONAR_HOST_URL}/static/cpp/build-wrapper-linux-x86.zip" - - unzip -oj build-wrapper-linux-x86.zip -d ./build-wrapper - script: - - conan install . --deployer=full_deploy --deployer-folder=build --remote=bigfootpackages -pr:h=gcc_coverage -pr:b=gcc_coverage --build=missing -s build_type=Debug -o bigfoot/*:unity_build=False -o bigfoot/*:build_tests=True -o bigfoot/*:sample_app=False -o bigfoot/*:tracy=False -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=False -o bigfoot/*:build_benchmarks_lto=False -o bigfoot/*:render_doc=False - - cmake -S . -B ./build/Debug --toolchain ./build/Debug/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Debug -G "Ninja" - - ./build-wrapper/build-wrapper-linux-x86-64 --out-dir bw-output cmake --build ./build/Debug --parallel $(nproc) - - chmod +x sonarqube.sh && xvfb-run ./sonarqube.sh - - ./sonar-scanner/bin/sonar-scanner -Dsonar.host.url="${SONAR_HOST_URL}" -Dsonar.token="${SONAR_BIGFOOT2_TOKEN}" -Dsonar.cfamily.compile-commands=bw-output/compile_commands.json -Dsonar.coverageReportPaths=SonarqubeResult/CoverageReport/coverage.xml -Dsonar.cfamily.cppunit.reportsPath=SonarqubeResult/UnitTests/Merged/CPPUnit - after_script: - - ccache --show-stats - artifacts: - when: always - name: BuildAndCoverage - paths: - - build/Debug - - SonarqubeResult - expire_in: 1 week - cache: - - key: "$CI_JOB_NAME" - paths: - - $CCACHE_DIR - tags: - - linux - - c++ - - bigfootdev \ No newline at end of file