Skip to content

Tasks #1

@mcmarius

Description

@mcmarius
  • 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 msvc cu 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 }}
set(CMAKE_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/install_dir" CACHE PATH "..." FORCE)

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.com

Cloning 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 kbhit and cls
    • create patch files to add defines/undefines for WIN32_MEAN_AND_LEAN and NOMINMAX in rlutil and csv-parser
  • keep main without any ext libs (at least for now)
  • refactor out some steps from .github/workflows/cmake.yml into scripts/
  • 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/
  • 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??

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions