diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..3b9540e --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,43 @@ +name: analyse on codeql + +on: + repository_dispatch: + workflow_dispatch: + push: + pull_request: + schedule: + - cron: '43 23 * * 4' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + strategy: + fail-fast: false + matrix: + language: [ 'cpp' ] + + steps: + - name: checkout + uses: actions/checkout@v3 + - name: install dependencies + run: | + sudo apt update + sudo apt install git cmake make clang + - name: update submodule + run: | + git submodule update --init --recursive + - name: initialize codeql + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + - name: autobuild + uses: github/codeql-action/autobuild@v2 + - name: perform analysis + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{matrix.language}}" diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 0000000..9c8d00c --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,41 @@ +name: build default on macos + +on: + repository_dispatch: + workflow_dispatch: + push: + pull_request: + schedule: + - cron: '0 */2 * * *' + +env: + BUILD_TYPE: Release + +jobs: + build: + name: Test on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest] + + steps: + - name: checkout + uses: actions/checkout@v3 + - name: install dependencies + run: | + brew update + brew install git cmake make ccache + - name: update submodule + run: | + git submodule update --init --recursive + - name: configure cmake + run: | + cmake -B ${{github.workspace}}/build \ + -D CMAKE_INSTALL_PREFIX=${{github.workspace}}/build/install \ + -D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ + -D CMAKE_C_COMPILER=/usr/local/opt/ccache/libexec/clang + - name: make + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + - name: install + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -- install diff --git a/.github/workflows/ubuntu-clang.yml b/.github/workflows/ubuntu-clang.yml new file mode 100644 index 0000000..f6ac4e9 --- /dev/null +++ b/.github/workflows/ubuntu-clang.yml @@ -0,0 +1,42 @@ +name: build default on ubuntu clang + +on: + repository_dispatch: + workflow_dispatch: + push: + pull_request: + schedule: + - cron: '0 */2 * * *' + +env: + BUILD_TYPE: Release + +jobs: + build: + name: Test on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + + steps: + - name: checkout + uses: actions/checkout@v3 + - name: install dependencies + run: | + sudo apt update + sudo apt install git cmake make clang ccache + - name: update submodule + run: | + git submodule update --init --recursive + - name: configure cmake + run: | + cmake -B ${{github.workspace}}/build \ + -D CMAKE_INSTALL_PREFIX=${{github.workspace}}/build/install \ + -D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ + -D CMAKE_C_COMPILER=/usr/lib/ccache/clang + - name: make + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + - name: install + working-directory: ${{github.workspace}}/build + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -- install diff --git a/.github/workflows/ubuntu-gcc.yml b/.github/workflows/ubuntu-gcc.yml new file mode 100644 index 0000000..0d51853 --- /dev/null +++ b/.github/workflows/ubuntu-gcc.yml @@ -0,0 +1,42 @@ +name: build default on ubuntu gcc + +on: + repository_dispatch: + workflow_dispatch: + push: + pull_request: + schedule: + - cron: '0 */2 * * *' + +env: + BUILD_TYPE: Release + +jobs: + build: + name: Test on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + + steps: + - name: checkout + uses: actions/checkout@v3 + - name: install dependencies + run: | + sudo apt update + sudo apt install git cmake make gcc ccache + - name: update submodule + run: | + git submodule update --init --recursive + - name: configure cmake + run: | + cmake -B ${{github.workspace}}/build \ + -D CMAKE_INSTALL_PREFIX=${{github.workspace}}/build/install \ + -D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ + -D CMAKE_C_COMPILER=/usr/lib/ccache/gcc + - name: make + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + - name: install + working-directory: ${{github.workspace}}/build + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -- install diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 0000000..4b3f17d --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,45 @@ +name: build default on windows + +on: + repository_dispatch: + workflow_dispatch: + push: + pull_request: + schedule: + - cron: '0 */2 * * *' + +env: + BUILD_TYPE: Debug + +jobs: + build: + name: Test on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [windows-latest] + defaults: + run: + shell: msys2 {0} + + steps: + - name: checkout + uses: actions/checkout@v3 + - name: install dependencies + uses: msys2/setup-msys2@v2 + with: + msystem: UCRT64 + update: true + install: git cmake make gcc + - name: update submodule + run: | + git submodule update --init --recursive + - name: configure cmake + run: | + cmake -B build \ + -D CMAKE_INSTALL_PREFIX=build/install \ + -D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + - name: make + run: cmake --build build --config ${{env.BUILD_TYPE}} + - name: install + run: cmake --build build --config ${{env.BUILD_TYPE}} -- install