Skip to content
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 8 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ jobs:
strategy:
matrix:
os: [ubuntu-22.04]
compiler: [g++,clang++]
# clang++ has been disabled for Jan 2026 update
#compiler: [g++,clang++]
compiler: [g++]
if: "!contains(github.event.head_commit.message, 'ci skip')"

steps:
Expand Down Expand Up @@ -37,16 +39,16 @@ jobs:
matrix:
os: [ubuntu-22.04]
test:
- compiler: clang++
job: normalize
- compiler: clang++
job: comp
#- compiler: clang++
# job: normalize
#- compiler: clang++
# job: comp
- compiler: g++
job: normalize
- compiler: g++
job: comp
- compiler: g++
job: cov
job: coverage
- compiler: g++
job: memcheck
steps:
Expand Down
64 changes: 31 additions & 33 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ cache:
- temp/cppcheck.Linux.g++

stages:
- master-only
- build
- test
- master-only
- sched-only

# skip pipeline for master, and for temporary branches not eligible to be merged
Expand All @@ -21,6 +21,12 @@ stages:
- /^tmp.*/
- schedules

# skip pipeline schedules
.excludes_schedules: &excludes_schedules_tmp
except:
- schedules
- /^tmp.*/

# execute pipeline on when master changes
.masteronly: &masteronly
rules:
Expand All @@ -35,18 +41,20 @@ stages:
when: always

before_script:
- 'echo "${CI_JOB_STAGE}:${CI_JOB_NAME} host:$(hostname) pwd:$(pwd) user:$(whoami) date:$(date)"'
- export PATH=$PATH:bin
- echo "${CI_JOB_STAGE}:${CI_JOB_NAME} host:$(hostname) pwd:$(pwd) user:$(whoami) date:$(date)"
- export PATH="$PATH:bin"

build:
stage: build
script:
- bin/ai
- gcache -install -dir .gcache
artifacts:
paths:
- build
- .gcache
expire_in: 1 week
<<: *excludes
<<: *excludes_schedules_tmp

normalize:
stage: test
Expand All @@ -64,51 +72,41 @@ comp:
script:
- bin/normalize "${CI_JOB_NAME}"
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: temp/atf_comp/cov.d/cobertura.xml
when: on_failure
when: always
paths:
- temp/*.log
expire_in: 1 week
# run on feature branches (no master no schedule)
<<: *excludes

memcheck:

coverage:
stage: test
script:
- bin/normalize "${CI_JOB_NAME}"
<<: *excludes

# Master only actions

deploy-html-docs:
# build pages for gitlab deployment
stage: master-only
script:
- bin/gitlab_master_ci deploy-html-docs
<<: *masteronly
# added coverage report parsing
coverage: '/TOTAL\s+\d+\s+\d+\s+([\d.]+)%?/' # Extracts 58.62 from "TOTAL 22124 12970 58.62"
artifacts:
when: always
reports:
coverage_report:
coverage_format: cobertura
path: temp/atf_comp/cov.d/cobertura.xml
# run on all CI runs(feature branches for MR code coverage widget and master branch for analytics)
<<: *excludes_schedules_tmp

backup-master-to-github:
# push master to github
stage: master-only
script:
- bin/gitlab_master_ci backup-master-to-github
<<: *masteronly

backup-issues-to-github:
# read all open issue and create files based on them
# create commit and push it as issue branch
stage: master-only
memcheck:
stage: test
script:
- bin/gitlab_master_ci backup-issues-to-github
<<: *masteronly
- bin/normalize "${CI_JOB_NAME}"
<<: *excludes

# Schedule only actions

future-scheduled-actions:
# Do some task
stage: sched-only
stage: sched-only
script:
- echo HELLO SCHED
<<: *schedonly
18 changes: 18 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**",
"/usr/include",
"/usr/local/include"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"intelliSenseMode": "linux-gcc-x64",
"cStandard": "c11",
"cppStandard": "c++17"
}
],
"version": 4
}
30 changes: 30 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "ACR Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/temp/a.out",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
],
"preLaunchTask": "ACR select debug target"
},
]
}
30 changes: 30 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"C_Cpp.clang_format_fallbackStyle": "{ BasedOnStyle: Google, IndentWidth: 4, ColumnLimit: 120, IndentCaseLabels:false, IndentCaseBlocks:true, InsertBraces:true}",
"editor.wordWrapColumn": 120,
"editor.autoClosingBrackets": "never",
"[cpp]": {
"editor.defaultFormatter": "ms-vscode.cpptools"
},
"files.trimTrailingWhitespace": true,
"files.associations": {
"typeinfo": "cpp",
"memory": "cpp",
"tuple": "cpp",
"array": "cpp",
"string_view": "cpp",
"initializer_list": "cpp",
"new": "cpp",
"system_error": "cpp",
"compare": "cpp",
"functional": "cpp",
"ratio": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"condition_variable": "cpp",
"cstddef": "cpp"
},
"search.exclude": {
"temp": true,
"build": true,
},
}
67 changes: 67 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "ACR release build",
"type": "shell",
"command": "ai && acr -check % && amc && update-hdr && abt %",
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "ACR debug build",
"type": "shell",
"command": "abt -cfg:debug %",
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": false
},
"dependsOn": [
"ACR release build"
]
},
{
"label": "ACR normalize",
"type": "shell",
"command": "normalize",
"group": {
"kind": "test",
"isDefault": false
},
"dependsOn": [
"ACR release build"
]
},
{
"label": "ACR select debug target",
"type": "shell",
"command": "bin/vscode-select-debug-target ${file} ${workspaceFolder}/temp/a.out",
"group": {
"kind": "build",
"isDefault": false
},
"dependsOn": [
"ACR debug build"
]
},
{
"label": "Indent current source and update headers",
"type": "shell",
"command": "bin/cpp-indent ${file}; update-hdr",
"group": {
"kind": "build",
"isDefault": false
},
},
]
}
2 changes: 1 addition & 1 deletion bin/abt_md_filt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Copyright (C) 2023-2024 AlgoRND
# Copyright (C) 2023-2026 AlgoRND
#
# License: GPL
# This program is free software: you can redistribute it and/or modify
Expand Down
6 changes: 3 additions & 3 deletions bin/ai
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env perl
# Copyright (C) 2023-2024 AlgoRND
# Copyright (C) 2023-2026 AlgoRND
#
# License: GPL
# This program is free software: you can redistribute it and/or modify
Expand All @@ -23,7 +23,7 @@ sub Die {
print "error $_[0]. more info in txt/exe/abt/README.md\n";
exit(1);
}
my $clean = scalar(grep(/^-clean$/,@ARGV)) || (system("abt --version >/dev/null 2>/dev/null")!=0 && ! -x "bin/abt");
my $clean = scalar(grep(/^-clean$/,@ARGV)) || system("abt --version >/dev/null 2>/dev/null")!=0;
@ARGV = grep(!/^-clean$/,@ARGV);
# check if abt exists
if ($clean) {
Expand All @@ -37,4 +37,4 @@ $F = "%" if !$F;
# allow this one to fail
system("bin/src_hdr", "-write", "-targsrc:%");
# main build step
system("bin/abt", "-build", $F, @ARGV)==0 or Die("abt failed: $?");
system("bin/abt", "-build", "-install", $F, @ARGV)==0 or Die("abt failed: $?");
2 changes: 1 addition & 1 deletion bin/alexei-setup-soft-links
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Copyright (C) 2023-2024 AlgoRND
# Copyright (C) 2023-2026 AlgoRND
#
# License: GPL
# This program is free software: you can redistribute it and/or modify
Expand Down
1 change: 0 additions & 1 deletion bin/ams_cat

This file was deleted.

1 change: 1 addition & 0 deletions bin/atf_exp
20 changes: 20 additions & 0 deletions bin/bash-indent
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
# Copyright (C) 2025-2026 AlgoRND
#
# License: GPL
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#

command -v shfmt >/dev/null || sudo bin/install-shfmt >/dev/null 2>&1
for f in "${@:-/dev/stdin}"; do shfmt -w "$f"; done
Loading