Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add selfhost pipeline #38

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/CI_format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ permissions:
contents: read

'on':
pull_request:
push:
branches:
- master
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/CI_ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ permissions:
contents: read

'on':
pull_request:
push:
branches:
- master
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/delete_old_runs.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Delete old workflow runs
permissions:
actions: write

on:
workflow_dispatch:
inputs:
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/sh_CI_format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI

permissions:
actions: write
contents: read

'on':
pull_request:
branches:
- master

env:
UBSAN_OPTIONS: print_stacktrace=1

jobs:
posix:
strategy:
fail-fast: false

name: 'format'
runs-on: ubuntu-24.04

steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1

- name: Checkout the code
uses: actions/checkout@v2

- name: Install clang-format
run: |
sudo apt install clang-format-17
- name: Format
run: >
sudo make
-f scripts/ci_ubuntu.make
format

- name: Check if all files are committed to git
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Странное название, это проверка что формат ничего не изменил

run: >
sudo make
-f scripts/ci_ubuntu.make
check-git-status
83 changes: 83 additions & 0 deletions .github/workflows/sh_CI_ubuntu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: CI

permissions:
actions: write
contents: read

'on':
pull_request:
branches:
- master

env:
UBSAN_OPTIONS: print_stacktrace=1

jobs:
posix:
strategy:
fail-fast: false
matrix:
include:
- type: debug
compiler: clang
version: 17
- type: debug
compiler: clang
version: 19
- type: debug
compiler: gcc
version: 12
- type: debug
compiler: gcc
version: 14

name: ubuntu-24.04 ${{matrix.type}} ${{matrix.compiler}}-${{matrix.version}}
runs-on: sh_ubuntu-24.04

steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1

- name: Checkout the code
uses: actions/checkout@v2

- name: ccache activate logs
if: ${{runner.debug}}
run: |
echo "CCACHE_LOGFILE=$(pwd)/ccache.log" >> $GITHUB_ENV

- name: Setup ccache
run: |
ccache -M 2.0GB

- name: Reuse ccache directory
uses: actions/cache@v2
with:
path: ~/.cache/ccache
key: 'ubuntu-24.04 ${{matrix.type}} ${{matrix.compiler}}-${{matrix.version}} ccache-dir ${{github.ref}}'
restore-keys: |
ubuntu-24.04 ${{matrix.type}} ${{matrix.compiler}}-${{matrix.version}} ccache-dir ${{github.ref}}
ubuntu-24.04 ${{matrix.type}} ${{matrix.compiler}}-${{matrix.version}} ccache-

- name: Configure cmake project
run: |
cp scripts/presets_ubuntu-24.04.json CMakePresets.json
cmake --preset ${{matrix.compiler}}_${{matrix.version}}_${{matrix.type}}

- name: Build project
run: >
cmake
--build cmake_build
--target all

- name: ccache stats after build
run: |
ccache -s
- name: ccache more logs
if: ${{runner.debug}}
run: |
cat ~/ccache.log

- name: Run tests
run: |
cd cmake_build && ctest -V
Loading