-
Notifications
You must be signed in to change notification settings - Fork 20
Description
- update deps (e.g. compilers, cppcheck); vezi issue
- de documentat asta (trebuie săpat prin proiectele din 2022-2023 sem 2): 6e13486
- de văzut dacă mai e nevoie de env_fixes.h -> de reprodus bug-ul inițial pe sfml 2.5.1 și apoi același exemplu cu sfml 2.6.x
- nu instala ninja
pe msvccu choco - copiază dll-urile corecte; done (dar poate mai trebuie verificat)
- name: Copy stdlib (MinGW)
if: runner.os == 'Windows' && matrix.cxx == 'g++'
# static linking might not work with MinGW, might be easier this way
run: |
cp gcc/mingw64/bin/libstdc++-6.dll \
gcc/mingw64/bin/libgcc_s_seh-1.dll \
gcc/mingw64/bin/libwinpthread-1.dll \
${GITHUB_WORKSPACE}/${{ env.ZIP_NAME }}
- https://github.com/create-dmg/create-dmg
- cale absolută pt install dir (unele ext libs au pretenții); done
set(CMAKE_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/install_dir" CACHE PATH "..." FORCE)- https://docs.github.com/en/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds done
- de pus la loc manual mingw și cppcheck latest; done
checkoute deja implicit 1with: fetch-depth: 1- de văzut presupuneri implicite pentru configurații locale
- de exemplu: clang pe Linux pare că nu ar folosi automat libc++; de căutat detecție de stdlib?? done?
- comentarii detaliate la fiecare pas; done?
- de pus screenshots la colocviu pentru încărcare ca atașament (și exemplu de "așa nu"); done
- de schimbat titlul să fie mai clar că trebuie schimbat ("Nu primesc nota că nu am pus titlu"); done
change release action to this one since the current one seems unmaintained; quick temp workaround: https://github.com/timheuer/action-gh-releaseoriginal action has been updated- de pus indicații mai vizibile (?? tastatura.txt, fps limit în sfml etc.) în main.cpp (și/sau readme)
- de menționat la tema 2 că o ierarhie trebuie să fie bază proprie, nu derivată dintr-o clasă predefinită (de exemplu
sf::Drawablesausf::Shape) - de menționat la tema 2 că noua derivată nu poate fi una existentă care a fost ștearsă și adăugată din nou
- theo543/asteroids@c8d81cd
- de adăugat eventual asta ca un cod comentat pe sfml branch theo543/asteroids@3a6dfa7
- theo543/asteroids@4746d68
- de reparat cache-ul de cmake
_depspe cppcheck/clang-tidy - https://pvs-studio.com/en/blog/posts/cpp/1053/
- SFML: add env variable for window name in scripts; thanks to @i2002 for discovering this issue
- leviaici/tema1-poo@7827396
- alexalex200/TEMA1-POO-Checkers@c4c98aa
- SFML with threads: NeonSkye/Proiect-OOP@0d960a4
- ?? 0xfabian/oop@2d6e2cd
- investigate warnings_as_errors issues: use https://cmake.org/cmake/help/latest/prop_tgt/COMPILE_WARNING_AS_ERROR.html#prop_tgt:COMPILE_WARNING_AS_ERROR
- prefix the names of the first 3 actions with Cppcheck, Sanitizers, Valgrind; cppcheck and clang-tidy (still optional) as separate workflows
- use default cppcheck to simplify setup ✔️
- ?? remove custom mingw setup since gh actions now includes winlibs version
- skip msan setup on sfml because we do not run it anyway on this branch
- update cmake in cmakelists to 3.24 (runners have 3.25 as of 2023-01-05)
- remove cmakelists code duplication from setting sanitizers
- backport function to base branch ✔️
- ?? tbd disable cppcheck ShadowArgument and rely on compiler warnings??
- use apt-fast??
- sync cu pc1-template ✔️
Tema 2: de scris un pic alternativă la cast cu dynamic_pointer_cast pt shared_ptr
Tema 3: exemplu de mixin: countable pt numărat totalul de obiecte; crtp ar fi modificări la structură, mixin ar fi modificări la comportament
Dezavantaje singleton cu CRTP: https://codereview.stackexchange.com/questions/255212/generic-meyers-singleton-implementation-in-c
Ezoterisme: https://stackoverflow.com/questions/3499101/when-do-we-need-a-template-construct
Make variable for archive name, move tag at the end of the name ✔️
Clang 14 -> clang 12 în cmakelists.txt:97 ✔️
Retention 15 days ✔️
Rename bin/ to archive name ✔️
Matrix params for valgrind, sanitizers etc ✔️
NOTE!
valgrind cat tastatura.txt | ./main would detect leaks for cat! We must run cat tastatura.txt | valgrind ./main
- shallow clone in fetchcontent ✔️
Merging branches
# from main branch:
git merge --allow-unrelated-histories --strategy-option=theirs origin/sfml
# or the long way
git merge --allow-unrelated-histories origin/sfml
git checkout --theirs .
git add .
git commit -m "Add SFML lib"Testing ssh with custom ssh key:
ssh -i ~/.ssh/gh_ed25519 -T git@github.comCloning with custom ssh key:
# -c sau --config
# -i de la identity
git clone -c core.sshCommand="ssh -i ~/.ssh/gh_ed25519" git@github.com:user/repo.git- set CMake defines for CMAKE_INSTALL_PREFIX (and BUILD_SHARED_LIBS for SFML) if not already defined so the CMakeLists.txt is more self-contained
- branch with SFML template
- another branch with batteries included: by default add rlutil, random and digestpp, a header only CSV reader/writer, date (without time/tz?)? need some intuitive examples; make stats about other common deps
- patch rlutil to ignore
kbhitandcls - create patch files to add defines/undefines for
WIN32_MEAN_AND_LEANandNOMINMAXin rlutil and csv-parser
- patch rlutil to ignore
- keep main without any ext libs (at least for now)
- refactor out some steps from
.github/workflows/cmake.ymlintoscripts/ - switch back to msvcrt for now;
try to fork & migrate some deps to ucrt -
target_compile_features(target PRIVATE cxx_std_20) - workflow write permissions:
jobs:
build:
name: ...
runs-on: ...
permissions:
contents: write- copy missing dlls (tbd what dlls mingw needs):
- name: Copy missing dlls
if: runner.os == 'Windows' && matrix.cxx == 'cl'
run: |
cp $(where ucrtbased.dll) \
$(where VCRUNTIME140_1D.dll) \
$(where MSVCP140D.dll) \
$(where VCRUNTIME140D.dll) \
artifacts/bin/- note: these are for debugging; maybe also compile in release mode and archive both
- disable bogus MSVC warnings:
/wd4244 /wd4267 - sanitizers
- add
/fsanitize=addresscompiler flag in MSVC and run the executable - https://docs.microsoft.com/en-us/cpp/sanitizers/asan
- it should be enabled on CI according to this
- adjust sanitizers flags https://www.jetbrains.com/help/clion/2022.2/google-sanitizers.html#CompilerFlags
- add
- cppcheck: enable inline suppressions, disable some warnings: useStlAlgorithm, (TBA)
- inline suppressions should be enabled already according to docs; to be tested
- rename
date.txttotastatura.txt
- use tag for LLVM checkout: line 243:
git clone --depth=1 --branch=llvmorg-11.1.0 https://github.com/llvm/llvm-project - limit workflow duration to 30 minutes
- Research using docker/podman+buildah instead of Linux vms
- where to store images? quay.io?
- use Debian slim image; alpine might not work
- when not using fetch content, write portable scripts to download/build deps
- use env vars for download location
- research the overhead of a package manager and how flexible it is for repos that do not use that package manager
- prefer vcpkg or cpm or something available as a self contained binary
- try not to use conan or bazel (I know that bazel is not a package manager; I could not figure out if bzlmod supports c++) because those require additional runtimes (Python and Java, respectively)
- if that project does not even use cmake, we are out of luck: search for a fork that adds cmake support or create the fork ourselves
- alternative CI providers: Circle CI, Semaphore CI, AppVeyor? Cannot use only docker because we need to build binaries for Windows and MacOS
- alternative build systems??