Deployment of vcpkg Worker

About vcpkg

vcpkg is a package manager, just like apt or yum, but for C++ libraries. It has integration with Visual Studio, and it is cross-platform, but we will primarily use it on Windows to collect Dynamic link library (DLL) files Because building these dll files are extremely computationally intensive, and the projects hosted are limiting (~2000 projects), there is no need for high concurrency for our system. And vcpkg worker are implemented as standalone python scripts, so it is very easy to deploy.

Worker environment setup

We are using Windows Server 2022 Base, but deployment to Windows 10 or Windows 11 should be similar.

Note

Building vcpkg packages take up a lot of CPU resource and disk space, it is recommended to use a machine with at least 4 cores, 16GB of RAM, and 1TB of disk space.

  1. Please install these software on the worker machine:

    • Python 3.9+

    • Git

    • Visual Studio (any version you want to use)

    • CMake

    • Universal Ctags

    • Dia2dump

    • 7zip

  2. Register dll file for dia2dump

    # Need administator pivilage
    regsvr32 "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\DIA SDK\bin\msdia140.dll"
    regsvr32 "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildCommunityTools\DIA SDK\bin\amd64\msdia140.dll"
    
  3. Install vcpkg

    Please follow this link https://github.com/microsoft/vcpkg?tab=readme-ov-file#quick-start-windows to setup vcpkg properly

  4. Config system path, and make sure these commands are available in the command line:

    • python

    • git

    • readtags

    • ctags

    • dia2dump

    • 7z

    • vcpkg

  5. Clone Assemblage and switch to vcpkg branch

    git clone git@github.com:Assemblage-Dataset/Assemblage.git
    cd Assemblage
    git checkout windows_vcpkg
    
  6. Install python dependencies

    pip install -r requirements.txt
    
  7. Run the worker

    python dryworker.py