# # Docs on github action files: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions # # build-N-test # name: build-N-test on: push: workflow_dispatch: inputs: run_all: description: "run all" required: false default: "true" container_version: description: "Container Version" required: false default: "v3" deploy_doxygen: description: "deploy_doxygen" required: false default: "false" # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: contents: read pages: write id-token: write jobs: LinuxMatrixPrep: runs-on: ubuntu-latest outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - name: Check out code into the Go module directory uses: actions/checkout@v4 - id: set-matrix run: | branchName=$(echo '${{ github.ref }}' | sed 's,refs/heads/,,g') matrix=$(jq --arg branchName "$branchName" 'map( . | select((.run_on_branch==$branchName) or (.run_on_branch=="always") or ("${{github.event.inputs.run_all}}"=="true") and (.run_on_branch!="never")) | select(.build_job=="Linux") )' .github/workflows/build-N-test-Matrix.json) echo "matrix={\"include\":$(echo $matrix)}" >> $GITHUB_OUTPUT MacOSMatrixPrep: runs-on: ubuntu-latest outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - name: Check out code into the Go module directory uses: actions/checkout@v4 - id: set-matrix run: | branchName=$(echo '${{ github.ref }}' | sed 's,refs/heads/,,g') matrix=$(jq --arg branchName "$branchName" 'map( . | select((.run_on_branch==$branchName) or (.run_on_branch=="always") or ("${{github.event.inputs.run_all}}"=="true")) | select(.build_job=="MacOS") )' .github/workflows/build-N-test-Matrix.json) echo "matrix={\"include\":$(echo $matrix)}" >> $GITHUB_OUTPUT WindowsMatrixPrep: runs-on: ubuntu-latest outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - name: Check out code into the Go module directory uses: actions/checkout@v4 - id: set-matrix run: | branchName=$(echo '${{ github.ref }}' | sed 's,refs/heads/,,g') matrix=$(jq --arg branchName "$branchName" 'map( . | select((.run_on_branch==$branchName) or (.run_on_branch=="always") or ("${{github.event.inputs.run_all}}"=="true")) | select(.build_job=="Windows") )' .github/workflows/build-N-test-Matrix.json) echo "matrix={\"include\":$(echo $matrix)}" >> $GITHUB_OUTPUT Linux: needs: LinuxMatrixPrep runs-on: ${{ matrix.runs_on }} strategy: matrix: ${{fromJson(needs.LinuxMatrixPrep.outputs.matrix)}} env: # (HISTORICAL): vm has 2 virtual CPUs, but 8GB ram, so jobs=3 (empirical), and QUICK_BUILD avoids some internal testing # vm has 4 virtual CPUs, but 16GB ram, so jobs=4 (empirical. tried 5 and 6 with no significant improvement), and QUICK_BUILD avoids some internal testing --LGP 2025-02-07 MAKEFLAGS: "--jobs=4 QUICK_BUILD=1" ARTIFACTS_DIR: "/tmp/Artifacts/" ARTIFACTS_DIR_BUILDLOGS: "${ARTIFACTS_DIR}/BUILD_LOGS/" container: ${{ matrix.container_image }}:${{github.event.inputs.container_version || 'v3'}} steps: - uses: actions/checkout@v4 - name: Build System Info (container version ${{github.event.inputs.container_version || 'v3'}}) run: | lsb_release -d 2>/dev/null || true echo "CWD=" `pwd` echo "hw.ncpu=" $(sysctl -n hw.ncpu) echo "hw.memsize=" $(sysctl -n hw.memsize) grep "model name" /proc/cpuinfo | head -1 grep processor /proc/cpuinfo | wc -l grep MemTotal /proc/meminfo df -h - name: Due to insufficient disk space error on ubuntu-latest github actions, use smaller initial base container and add stuff needed shell: "bash" if: matrix.extra_apt_add_packages != null env: DEBIAN_FRONTEND: noninteractive APT_ADD_JSON_ARRAY_STRING: ${{ toJSON(matrix.extra_apt_add_packages) }} run: | echo "extra_apt_add_packages=\"${APT_ADD_JSON_ARRAY_STRING}"\" readarray -t extra_apt_add_packages < <(echo "$APT_ADD_JSON_ARRAY_STRING" | jq -r '.[]') for package in "${extra_apt_add_packages[@]}"; do echo "apt-get install -qq -y $package" apt-get install -qq -y "$package" || true done apt-get autoremove -qq -y || true apt-get clean -qq -y || true - name: Save space (Before Start of Builds) shell: "bash" if: always() env: DEBIAN_FRONTEND: noninteractive APT_REMOVE_JSON_ARRAY_STRING: ${{ toJSON(matrix.extra_apt_remove_packages) }} run: | echo "Before cleanup:" ; df -h df apt-get remove -y clang-*-doc clang-*-examples || true apt-get remove -y manpages* || true apt-get autoremove -y || true apt-get clean || true npm cache clean --force || true rm -rf Archive License.txt # Keep this hack around in case I discover a way to make it work, but for now it doesn't due to how layers work in docker images --LGP 2025-12-12 echo "extra_apt_remove_packages=\"${APT_REMOVE_JSON_ARRAY_STRING}"\" if [[ "$APT_REMOVE_JSON_ARRAY_STRING" == "null" ]] ; then echo "matrix.extra_apt_remove_packages is empty." else readarray -t extra_apt_remove_packages < <(echo "$APT_REMOVE_JSON_ARRAY_STRING" | jq -r '.[]') for package in "${extra_apt_remove_packages[@]}"; do echo "apt-get remove -y $package" apt-get remove -y "$package" || true done apt-get autoremove -y || true fi echo "After cleanup:" ; df -h - name: Configure ${{ matrix.config_name }} run: | ./configure ${{ matrix.config_name }} --compiler-driver ${{ matrix.compiler }} ${{ matrix.extra_config_args }} --cppstd-version ${{ matrix.cpp_version }} cat ConfigurationFiles/${{ matrix.config_name }}.xml # Break out third-party-components to do clean so we dont run out of disk space, and break out TPC AND library # to show the summary time for each part - name: Make third-party-components run: | make third-party-components - name: Copy Build Artifacts (third-party-components Log Data etc) if: always() run: | mkdir -p ${ARTIFACTS_DIR_BUILDLOGS} mkdir -p \ "${ARTIFACTS_DIR_BUILDLOGS}" \ "${ARTIFACTS_DIR_BUILDLOGS}/ThirdPartyComponents/boost/" \ "${ARTIFACTS_DIR_BUILDLOGS}/ThirdPartyComponents/curl/" \ "${ARTIFACTS_DIR_BUILDLOGS}/ThirdPartyComponents/GoogleTest/" \ "${ARTIFACTS_DIR_BUILDLOGS}/ThirdPartyComponents/libxml2/" \ "${ARTIFACTS_DIR_BUILDLOGS}/ThirdPartyComponents/lzma/" \ "${ARTIFACTS_DIR_BUILDLOGS}/ThirdPartyComponents/mongo-cxx-driver/" \ "${ARTIFACTS_DIR_BUILDLOGS}/ThirdPartyComponents/openssl/" \ "${ARTIFACTS_DIR_BUILDLOGS}/ThirdPartyComponents/sqlite/" \ "${ARTIFACTS_DIR_BUILDLOGS}/ThirdPartyComponents/Xerces/" \ "${ARTIFACTS_DIR_BUILDLOGS}/ThirdPartyComponents/zlib/" # NOTE - some of these copies may fail, if the item is not present, but not a problem (like if we dont build libxml2 the log files wont be there) cp "IntermediateFiles/${{ matrix.config_name }}/ThirdPartyComponents/boost/BOOTSTRAP-OUT.txt" "${ARTIFACTS_DIR_BUILDLOGS}/ThirdPartyComponents/boost/" || : cp "IntermediateFiles/${{ matrix.config_name }}/ThirdPartyComponents/boost/ConfigureAndBuild-OUT.txt" "${ARTIFACTS_DIR_BUILDLOGS}/ThirdPartyComponents/boost/" || : cp "IntermediateFiles/${{ matrix.config_name }}/ThirdPartyComponents/curl/CONFIGURE-OUT.txt" "${ARTIFACTS_DIR_BUILDLOGS}/ThirdPartyComponents/curl/" || : cp "IntermediateFiles/${{ matrix.config_name }}/ThirdPartyComponents/curl/BUILD-OUT.txt" "${ARTIFACTS_DIR_BUILDLOGS}/ThirdPartyComponents/curl/" || : cp "IntermediateFiles/${{ matrix.config_name }}/ThirdPartyComponents/GoogleTest/INSTALL-OUT.txt" "${ARTIFACTS_DIR_BUILDLOGS}/ThirdPartyComponents/GoogleTest/" || : cp "IntermediateFiles/${{ matrix.config_name }}/ThirdPartyComponents/libxml2/CONFIGURE-OUT.txt" "${ARTIFACTS_DIR_BUILDLOGS}/ThirdPartyComponents/libxml2/" || : cp "IntermediateFiles/${{ matrix.config_name }}/ThirdPartyComponents/libxml2/BUILD-OUT.txt" "${ARTIFACTS_DIR_BUILDLOGS}/ThirdPartyComponents/libxml2/" || : cp "IntermediateFiles/${{ matrix.config_name }}/ThirdPartyComponents/lzma/BUILD-OUT.txt" "${ARTIFACTS_DIR_BUILDLOGS}/ThirdPartyComponents/lzma/" || : cp "IntermediateFiles/${{ matrix.config_name }}/ThirdPartyComponents/mongo-cxx-driver/CONFIGURE-OUT.txt" "${ARTIFACTS_DIR_BUILDLOGS}/ThirdPartyComponents/mongo-cxx-driver/" || : cp "IntermediateFiles/${{ matrix.config_name }}/ThirdPartyComponents/mongo-cxx-driver/BUILD-OUT.txt" "${ARTIFACTS_DIR_BUILDLOGS}/ThirdPartyComponents/mongo-cxx-driver/" || : cp "IntermediateFiles/${{ matrix.config_name }}/ThirdPartyComponents/mongo-cxx-driver/INSTALL-OUT.txt" "${ARTIFACTS_DIR_BUILDLOGS}/ThirdPartyComponents/mongo-cxx-driver/" || : cp "IntermediateFiles/${{ matrix.config_name }}/ThirdPartyComponents/openssl/CONFIG-OUT.txt" "${ARTIFACTS_DIR_BUILDLOGS}/ThirdPartyComponents/openssl/" || : cp "IntermediateFiles/${{ matrix.config_name }}/ThirdPartyComponents/openssl/INSTALL-OUT.txt" "${ARTIFACTS_DIR_BUILDLOGS}/ThirdPartyComponents/openssl/" || : cp "IntermediateFiles/${{ matrix.config_name }}/ThirdPartyComponents/sqlite/BUILD-OUT.txt" "${ARTIFACTS_DIR_BUILDLOGS}/ThirdPartyComponents/sqlite/" || : cp "IntermediateFiles/${{ matrix.config_name }}/ThirdPartyComponents/Xerces/BUILD-OUT.txt" "${ARTIFACTS_DIR_BUILDLOGS}/ThirdPartyComponents/Xerces/" || : cp "IntermediateFiles/${{ matrix.config_name }}/ThirdPartyComponents/Xerces/INSTALL-OUT.txt" "${ARTIFACTS_DIR_BUILDLOGS}/ThirdPartyComponents/Xerces/" || : cp "IntermediateFiles/${{ matrix.config_name }}/ThirdPartyComponents/zlib/BUILD-OUT.txt" "${ARTIFACTS_DIR_BUILDLOGS}/ThirdPartyComponents/zlib/" || : cp "IntermediateFiles/${{ matrix.config_name }}/ThirdPartyComponents/zlib/INSTALL-OUT.txt" "${ARTIFACTS_DIR_BUILDLOGS}/ThirdPartyComponents/zlib/" || : - name: Save space (Safe) if: always() run: | make --directory=ThirdPartyComponents --silent clean # sometimes its useful to leave this around so when debugging you can still see source lines in debugger, but takes space and running out on github actions du -hs ThirdPartyComponents/*/CURRENT || true rm -rf ThirdPartyComponents/*/CURRENT echo "After cleanup:" ; df -h - name: Make libraries and tools run: | make libraries tools - name: Save space if: always() run: | echo "*************Before save space*************:" df -h du -hs Builds/*/* IntermediateFiles/*/* ThirdPartyComponents/Origs-Cache/ make --directory Library --silent clean make --directory ThirdPartyComponents --silent clean make --directory Tools --silent clean rm -f Builds/${{ matrix.config_name }}/ThirdPartyComponents/bin/* ThirdPartyComponents/Origs-Cache/* echo ""*************After cleanups"*************:" df -h du -hs Builds/*/* IntermediateFiles/*/* ThirdPartyComponents/* - name: Run Tests run: | make run-tests - name: Save space if: always() run: | echo "*************Before save space*************:" df -h du -hs Builds/*/* IntermediateFiles/*/* make --directory Tests --no-print-directory clobber echo ""*************After cleanups"*************:" df -h - name: Make samples run: | make samples - name: Build System Info run: | df -h - name: Copy Build Artifacts (Samples Log Data etc) if: always() run: | mkdir -p ${ARTIFACTS_DIR_BUILDLOGS} mkdir -p \ "${ARTIFACTS_DIR_BUILDLOGS}/Samples-HTMLUI/html/" # NOTE - some of these copies may fail, if the item is not present, but not a problem (like if we dont build libxml2 the log files wont be there) cp IntermediateFiles/"${{ matrix.config_name }}"/Samples-HTMLUI/html/*.txt "${ARTIFACTS_DIR_BUILDLOGS}/Samples-HTMLUI/html/" || : - name: Archive Samples Results uses: actions/upload-artifact@v4 with: name: Sample apps (${{ matrix.displayTargetName }}) if-no-files-found: warn path: | Builds/${{ matrix.config_name }}/*Samples-* - name: Archive Log Data if: always() uses: actions/upload-artifact@v4 with: name: Log Data (${{ matrix.displayTargetName }}) if-no-files-found: warn path: | ${{ env.ARTIFACTS_DIR }}PerformanceDump.txt ${{ env.ARTIFACTS_DIR_BUILDLOGS }} /tmp/Trace*.txt - name: Archive Core-Dumps if: always() uses: actions/upload-artifact@v4 with: name: CoreDumps (${{ matrix.displayTargetName }}) if-no-files-found: ignore path: | *core* MacOS: needs: MacOSMatrixPrep runs-on: ${{ matrix.runs_on }} strategy: matrix: ${{fromJson(needs.MacOSMatrixPrep.outputs.matrix)}} env: # vm has 3 virtual CPUs, but 8GB ram, so jobs=3 (empirical), and QUICK_BUILD avoids some internal testing --LGP 2025-05-08 MAKEFLAGS: "--jobs=3 QUICK_BUILD=1" # Workaround for LIBIDB2 not found https://github.com/actions/runner-images/issues/9638 LIBRARY_PATH: "/opt/homebrew/lib" steps: - uses: maxim-lobanov/setup-xcode@v1 with: xcode-version: ${{ matrix.xcode }} - uses: actions/checkout@v4 - name: Build System Info run: | echo "CWD: `pwd`" df -h system_profiler SPSoftwareDataType system_profiler SPDeveloperToolsDataType sw_vers echo " X-CODE: `xcodebuild -version | tr '\n' ';'`" echo "LIBRARY_PATH = $LIBRARY_PATH" echo "hw.ncpu=" $(sysctl -n hw.ncpu) echo "hw.memsize=" $(sysctl -n hw.memsize) # If we had docker ability, most of these would be built into a docker file - name: Install Basic Build requirements run: | brew install -q gnu-sed brew install -q p7zip brew install -q autoconf brew install -q libtool brew install -q automake make install-realpath - name: Configure run: | ./configure ${{ matrix.config_name }} ${{ matrix.extra_config_args }} cat ConfigurationFiles/${{ matrix.config_name }}.xml - name: Build third-party-components run: | make third-party-components make clean - name: Build Library and Tools run: | make libraries tools - name: Build Samples run: | make samples - name: Build Tests run: | make tests - name: Run-Tests run: | make run-tests - name: Workaround GitHub-Actions-MacOS Issue with env.TMPDIR if: always() run: | mkdir /tmp/LOGS-ARCHIVE cp $TMPDIR/Trace*.txt /tmp/LOGS-ARCHIVE || : - name: DEBUG Workaround GitHub-Actions-MacOS Issue with env.TMPDIR if: always() run: | echo "TMPDIR=$TMPDIR" echo "TMPDIR using ENV.TMPDIR=${{ env.TMPDIR }}" # Just the echo line above shows empty, and then the ls line causes exit 1/failure #ls -l ${{ env.TMPDIR }}/Trace*.txt #if this gets fixed, then lose Workaround GitHub-Actions-MacOS, and directly reference ${{ env.TMPDIR }}/Trace*.txt in Archive Log Data - name: Build System Info run: | df -h - name: Archive Log Data if: always() uses: actions/upload-artifact@v4 with: name: Log Data (${{ matrix.displayTargetName }}) if-no-files-found: warn path: | Builds/${{ matrix.config_name }}/PerformanceDump.txt /tmp/LOGS-ARCHIVE IntermediateFiles/${{ matrix.config_name }}/Samples-HTMLUI/*-Installer-Build-Output.txt IntermediateFiles/${{ matrix.config_name }}/ThirdPartyComponents/boost/BOOTSTRAP-OUT.txt IntermediateFiles/${{ matrix.config_name }}/ThirdPartyComponents/boost/ConfigureAndBuild-OUT.txt IntermediateFiles/${{ matrix.config_name }}/ThirdPartyComponents/curl/BUILD-CONF-TOOLS-OUT.txt IntermediateFiles/${{ matrix.config_name }}/ThirdPartyComponents/curl/CONFIGURE-OUT.txt IntermediateFiles/${{ matrix.config_name }}/ThirdPartyComponents/curl/BUILD-OUT.txt IntermediateFiles/${{ matrix.config_name }}/ThirdPartyComponents/GoogleTest/INSTALL-OUT.txt IntermediateFiles/${{ matrix.config_name }}/ThirdPartyComponents/libxml2/CONFIGURE-OUT.txt IntermediateFiles/${{ matrix.config_name }}/ThirdPartyComponents/libxml2/BUILD-OUT.txt IntermediateFiles/${{ matrix.config_name }}/ThirdPartyComponents/mongo-cxx-driver/CONFIGURE-OUT.txt IntermediateFiles/${{ matrix.config_name }}/ThirdPartyComponents/mongo-cxx-driver/BUILD-OUT.txt ${{ env.TMPDIR }}/Trace*.txt - name: Archive Sample Results uses: actions/upload-artifact@v4 with: name: Sample apps (${{ matrix.displayTargetName }}) if-no-files-found: warn path: | Builds/${{ matrix.config_name }}/Samples-* Windows: needs: WindowsMatrixPrep runs-on: ${{ matrix.runs_on }} strategy: matrix: ${{fromJson(needs.WindowsMatrixPrep.outputs.matrix)}} env: # see docker run for --cpus and --memory, and adjust --jobs accodingly (last done 2025-02-07), and QUICK_BUILD avoids some internal testing MAKEFLAGS: "--jobs=4 QUICK_BUILD=1" ARTIFACTS_DIR: "c:/Artifacts/" USE_DOCKER_ROOT: "D:/docker" steps: - uses: actions/checkout@v4 - name: Build System Info (container version ${{github.event.inputs.container_version || 'v3'}}) shell: "bash" run: | echo "CWD: `pwd`" echo "GITHUB_WORKSPACE: ${GITHUB_WORKSPACE}" df -h systeminfo echo NUMBER_OF_PROCESSORS=$NUMBER_OF_PROCESSORS echo "C:/ProgramData/Docker/config/daemon.json:" -n ; cat "C:/ProgramData/Docker/config/daemon.json" - name: Setup Docker to use ${{env.USE_DOCKER_ROOT}} as data-root shell: powershell run: | mkdir ${{env.USE_DOCKER_ROOT}} $configFile = "C:\ProgramData\Docker\config\daemon.json" # Ensure the config file exists if (-not (Test-Path $configFile)) { New-Item $configFile -ItemType File $config = @{} } else { $config = Get-Content $configFile | ConvertFrom-Json } # Add or update the 'data-root' property using Add-Member # -Force allows updating the property if it already exists $config | Add-Member -MemberType NoteProperty -Name "data-root" -Value "${{env.USE_DOCKER_ROOT}}" -Force # Write the updated config back to the file $config | ConvertTo-Json -Depth 4 | Set-Content $configFile # Print to verify updated properly Get-Content -Path $configFile # Restart Docker to apply changes echo "Restarting Docker Service..." Stop-Service Docker Start-Service Docker # Verify the new Docker Root Dir echo "docker info:" # docker info | Select-String "Docker Root Dir" echo "docker info:" docker info # No actual need todo this step (would be done implicitly/automatically) - but do to track how long the step takes (13min) - name: docker pull ${{ matrix.container_image }}:${{github.event.inputs.container_version || 'v3'}} run: docker pull ${{ matrix.container_image }}:${{github.event.inputs.container_version || 'v3'}} - name: Start docker build environment shell: "bash" # docker run --interactive --memory 7G --cpus 2 --storage-opt 'size=50GB' -v "${GITHUB_WORKSPACE}:c:\Stroika" --detach --name buildContainer ${{ matrix.container_image }}:${{github.event.inputs.container_version || 'v3'}} ash -c "c:/msys64/usr/bin/rebaseall -v; exec bash" # was running out of memory with 7GB docker container (doing build of help) - and appears running on 16G vm, 4 log cpus, and 147G space, so up mem# /disk (from 50GB) also appears host as 4 vir cpus, so up # cpus from 2 to 4-- LGP 2025-02-07 run: | docker run --interactive --memory 15G --cpus 4 --storage-opt 'size=120GB' \ -v "${GITHUB_WORKSPACE}:c:\Stroika" --detach --name buildContainer \ ${{ matrix.container_image }}:${{github.event.inputs.container_version || 'v3'}} bash - name: Print Info about docker system shell: "bash" run: | docker ps -a docker exec buildContainer systeminfo docker exec buildContainer echo NUMBER_OF_PROCESSORS=$NUMBER_OF_PROCESSORS docker exec buildContainer df -h - name: Configure shell: "bash" run: | docker exec --workdir c:/Stroika buildContainer sh -c "./configure ${{ matrix.config_name }} ${{ matrix.extra_config_args }}" docker exec --workdir c:/Stroika buildContainer cat ConfigurationFiles/${{ matrix.config_name }}.xml - name: Build Library and Tools shell: "bash" run: | docker exec --workdir c:/Stroika --env MAKEFLAGS="$MAKEFLAGS" buildContainer make libraries tools - name: Build Samples shell: "bash" run: | docker exec --workdir c:/Stroika --env MAKEFLAGS="$MAKEFLAGS" buildContainer make samples - name: Build Tests shell: "bash" run: | docker exec --workdir c:/Stroika --env MAKEFLAGS="$MAKEFLAGS" buildContainer make tests - name: Run-Tests shell: "bash" run: | docker exec --workdir c:/Stroika --env MAKEFLAGS="$MAKEFLAGS" buildContainer make run-tests - name: Build System Info shell: "bash" run: | df -h docker exec buildContainer df -h - name: Copy Build Artifacts (Log Data and Sample apps etc) shell: "bash" if: always() run: | # TMPHACK TO TEST echo stroika-platform.pc docker exec --workdir c:/Stroika buildContainer cat Builds/${{ matrix.config_name }}/lib/pkgconfig/stroika-platform.pc # Because of bind mount, no longer copy out of container, already built in outside filesystem # (except $TMPDIR: Just copy out from container the stuff in /tmp) NORMALIZED_WORKSPACE_DIR_=`cygpath --mixed "${GITHUB_WORKSPACE}"` # echo "ARTIFACTS_DIR=${ARTIFACTS_DIR}" # echo "GITHUB_WORKSPACE=${GITHUB_WORKSPACE}" echo "NORMALIZED_WORKSPACE_DIR_=${NORMALIZED_WORKSPACE_DIR_}" mkdir -p $ARTIFACTS_DIR (docker exec --workdir c:/ buildContainer bash -c 'mkdir -p c:/TRACE_LOGS; cp $TEMP/Trace*.txt c:/TRACE_LOGS/') || : # due to flaws in docker (windows must stop) - and docker cp doesn't support wildcards docker stop buildContainer (docker cp "buildContainer:c:/TRACE_LOGS" "${ARTIFACTS_DIR}") || echo "error copying tracelogs ignored" (cp -r --dereference "${NORMALIZED_WORKSPACE_DIR_}/Builds/${{ matrix.config_name }}/"Samples-* "${ARTIFACTS_DIR}") || echo "Error copying builds ignored" #PDB files are big - no need to save if I want to debug, will do from source/rebuild rm -rf "${ARTIFACTS_DIR}/"{ThirdPartyComponents,Tests,*.lib} "${ARTIFACTS_DIR}/"*/*.{pdb,wixpdb} COPY_FROM_ROOT_="${NORMALIZED_WORKSPACE_DIR_}/IntermediateFiles/${{ matrix.config_name }}/" COPY_TO_ROOT_="${ARTIFACTS_DIR}/BUILD_LOGS/" mkdir -p \ "${COPY_TO_ROOT_}" \ "${COPY_TO_ROOT_}/Samples-HTMLUI/html/" \ "${COPY_TO_ROOT_}/ThirdPartyComponents/boost/" \ "${COPY_TO_ROOT_}/ThirdPartyComponents/GoogleTest/" \ "${COPY_TO_ROOT_}/ThirdPartyComponents/libxml2/" \ "${COPY_TO_ROOT_}/ThirdPartyComponents/lzma/" \ "${COPY_TO_ROOT_}/ThirdPartyComponents/openssl/" \ "${COPY_TO_ROOT_}/ThirdPartyComponents/sqlite/" \ "${COPY_TO_ROOT_}/ThirdPartyComponents/Xerces/" \ "${COPY_TO_ROOT_}/ThirdPartyComponents/zlib/" cp "${COPY_FROM_ROOT_}/Samples-HTMLUI/html/NPM-Install.txt" "${COPY_TO_ROOT_}/Samples-HTMLUI/html/" || : cp "${COPY_FROM_ROOT_}/Samples-HTMLUI/html/Build.txt" "${COPY_TO_ROOT_}/Samples-HTMLUI/html/" || : cp "${COPY_FROM_ROOT_}/Samples-HTMLUI/html/WIX-Installer-Build-Output.txt" "${COPY_TO_ROOT_}/Samples-HTMLUI/" || : cp "${COPY_FROM_ROOT_}/ThirdPartyComponents/boost/BOOTSTRAP-OUT.txt" "${COPY_TO_ROOT_}/ThirdPartyComponents/boost/" || : cp "${COPY_FROM_ROOT_}/ThirdPartyComponents/boost/ConfigureAndBuild-OUT.txt" "${COPY_TO_ROOT_}/ThirdPartyComponents/boost/" || : cp "${COPY_FROM_ROOT_}/ThirdPartyComponents/GoogleTest/INSTALL-OUT.txt" "${COPY_TO_ROOT_}/ThirdPartyComponents/GoogleTest/" || : cp "${COPY_FROM_ROOT_}/ThirdPartyComponents/libxml2/CONFIGURE-OUT.txt" "${COPY_TO_ROOT_}/ThirdPartyComponents/libxml2/" || : cp "${COPY_FROM_ROOT_}/ThirdPartyComponents/libxml2/BUILD-OUT.txt" "${COPY_TO_ROOT_}/ThirdPartyComponents/libxml2/" || : cp "${COPY_FROM_ROOT_}/ThirdPartyComponents/lzma/BUILD-OUT.txt" "${COPY_TO_ROOT_}/ThirdPartyComponents/lzma/" || : cp "${COPY_FROM_ROOT_}/ThirdPartyComponents/openssl/CONFIG-OUT.txt" "${COPY_TO_ROOT_}/ThirdPartyComponents/openssl/" || : cp "${COPY_FROM_ROOT_}/ThirdPartyComponents/openssl/INSTALL-OUT.txt" "${COPY_TO_ROOT_}/ThirdPartyComponents/openssl/" || : cp "${COPY_FROM_ROOT_}/ThirdPartyComponents/sqlite/BUILD-OUT.txt" "${COPY_TO_ROOT_}/ThirdPartyComponents/sqlite/" || : cp "${COPY_FROM_ROOT_}/ThirdPartyComponents/Xerces/BUILD-OUT.txt" "${COPY_TO_ROOT_}/ThirdPartyComponents/Xerces/" || : cp "${COPY_FROM_ROOT_}/ThirdPartyComponents/Xerces/INSTALL-OUT.txt" "${COPY_TO_ROOT_}/ThirdPartyComponents/Xerces/" || : cp "${COPY_FROM_ROOT_}/ThirdPartyComponents/zlib/BUILD-OUT.txt" "${COPY_TO_ROOT_}/ThirdPartyComponents/zlib/" || : cp "${COPY_FROM_ROOT_}/ThirdPartyComponents/zlib/INSTALL-OUT.txt" "${COPY_TO_ROOT_}/ThirdPartyComponents/zlib/" || : - name: Archive Log Data if: always() uses: actions/upload-artifact@v4 with: name: Log Data (${{ matrix.displayTargetName }}) if-no-files-found: warn path: | ${{ env.ARTIFACTS_DIR }}PerformanceDump.txt ${{ env.ARTIFACTS_DIR }}BUILD_LOGS ${{ env.ARTIFACTS_DIR }}TRACE_LOGS - name: Archive Sample Results uses: actions/upload-artifact@v4 with: name: Sample apps (${{ matrix.displayTargetName }}) if-no-files-found: warn path: | ${{ env.ARTIFACTS_DIR }}Samples-* codeql-analyze: name: codeql-analyze runs-on: ubuntu-latest permissions: actions: read contents: read security-events: write strategy: fail-fast: false matrix: language: [ 'cpp' ] # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] # Learn more: # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed env: # QUICK_BUILD avoids some internal testing MAKEFLAGS: "--jobs=4 QUICK_BUILD=1" steps: - name: Checkout repository uses: actions/checkout@v4 - name: Install tools required to build Stroika run: | sudo apt-get update -y sudo apt-get install -y libtool-bin pkg-config cmake automake autoconf libtool-bin sudo apt-get install -y g++ - name: Configure # NOTE - disable optimizer due bugs/errors in optimizer (link errors) - but no matter, cuz also slows down analysis (I think) # --debug-symbols false to save space and cuz no need run: | ./configure Release --compiler-driver g++ --apply-default-release-flags --lto disable --append-CXXFLAGS -O0 --debug-symbols false cat ConfigurationFiles/Release.xml # Break out third-party-components to do clean so we dont run out of disk space, and break out TPC AND library # to show the summary time for each part - name: Make third-party-components run: | make third-party-components make clean # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. # queries: ./path/to/local/query, your-org/your-repo/queries@main - name: Make Stroika run: make all - name: Archive Log Data if: always() uses: actions/upload-artifact@v4 with: name: Log Data (codeql-analyze) if-no-files-found: warn path: | IntermediateFiles/Release/Samples-HTMLUI/*-Installer-Build-Output.txt IntermediateFiles/Release/ThirdPartyComponents/curl/CONFIGURE-OUT.txt - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 doxygen: runs-on: ubuntu-latest container: sophistsolutionsinc/stroika-buildvm-ubuntu2404-regression-tests steps: - uses: actions/checkout@v4 - name: Build System Info (container version ${{github.event.inputs.container_version || 'v3'}}) run: | lsb_release -d 2>/dev/null || true echo "CWD=" `pwd` echo "hw.ncpu=" $(sysctl -n hw.ncpu) echo "hw.memsize=" $(sysctl -n hw.memsize) grep "model name" /proc/cpuinfo | head -1 grep processor /proc/cpuinfo | wc -l grep MemTotal /proc/meminfo df -h - name: Make Documentation run: | make documentation (cd Builds; tar xvf Stroika-Doxygen-Help.tar.gz) - name: Archive Documentation Results uses: actions/upload-artifact@v4 # https://github.com/actions/upload-artifact/issues/506 include matrix configname until bug fixed --LGP 2024-11-27 continue-on-error: true with: name: Stroika-Doxygen-Help path: | Builds/Stroika-Doxygen-Help - name: Archive Log Data if: always() uses: actions/upload-artifact@v4 with: name: Log Data (doxygen) if-no-files-found: warn path: | IntermediateFiles/Doxygen/BUILD.txt # Single deploy job since we're just deploying help to github pages deploy-doxygen: needs: doxygen if: github.event.inputs.deploy_doxygen == 'true' || github.ref == 'refs/heads/v3-Release' environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest container: sophistsolutionsinc/stroika-buildvm-ubuntu2404-regression-tests steps: - name: Checkout uses: actions/checkout@v4 - name: Make Documentation (since I dont know how to copy result from other step - this is simpler) run: | make documentation (cd Builds; tar xvf Stroika-Doxygen-Help.tar.gz) - name: Setup Pages uses: actions/configure-pages@v5 - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: path: 'Builds/Stroika-Doxygen-Help' - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4