Repository navigation
dasLLAMA: served chat audio and vision on Metal, media cached with the conversation #14339
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: build | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| workflow_dispatch: | |
| defaults: | |
| run: | |
| shell: bash | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }} | |
| # a master push run is the sccache seeder; cancelled by the next merge it saves nothing, so | |
| # master runs queue while PR runs still supersede each other | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| ########################################################### | |
| pre_job: | |
| ########################################################### | |
| # continue-on-error: true # Uncomment once integration is finished | |
| runs-on: ubuntu-latest | |
| # Map a step output to a job output | |
| outputs: | |
| should_skip: ${{ steps.skip_check.outputs.should_skip }} | |
| steps: | |
| - id: skip_check | |
| uses: fkirc/skip-duplicate-actions@v5 | |
| with: | |
| # All of these options are optional, so you can remove them if you are happy with the defaults | |
| concurrent_skipping: 'same_content' | |
| do_not_skip: '["pull_request", "workflow_dispatch", "release"]' | |
| - name: Cache LLVM | |
| uses: actions/cache@v3 | |
| id: llvm-cache | |
| with: | |
| # Cache LLVM.dll, to make CI faster. | |
| path: build/_deps/das_llvm_shared_lib-src | |
| key: ${{ runner.os }}-${{ hashFiles('modules/dasLLVM/CMakeLists.txt') }} | |
| ########################################################### | |
| build: | |
| ########################################################### | |
| needs: pre_job | |
| if: needs.pre_job.outputs.should_skip != 'true' | |
| permissions: | |
| contents: read | |
| actions: write | |
| uses: ./.github/workflows/build_matrix.yml | |
| with: | |
| lane: build | |
| ########################################################### | |
| bundle_smoke: | |
| ########################################################### | |
| # Catches release-bundle install-rule regressions at PR time on the | |
| # platform that produces 95% of such bugs (Linux x86_64). Mirrors the | |
| # release.yml linux64 build path: same module flags via ci/release_modules.txt, | |
| # same install layout (cmake --install --prefix ./daslang_bundle), same | |
| # ci/smoke_test_bundle.sh that release.yml runs. Full-matrix smoke is | |
| # still gated at release-cut time in release.yml. | |
| ########################################################### | |
| needs: pre_job | |
| if: needs.pre_job.outputs.should_skip != 'true' | |
| runs-on: ubuntu-latest | |
| # actions: write needed for `gh cache delete` in the sccache refresh step. | |
| permissions: | |
| contents: read | |
| actions: write | |
| steps: | |
| - name: "SCM Checkout" | |
| uses: actions/checkout@v4 | |
| - name: "Install CMake and Ninja" | |
| uses: lukka/get-cmake@latest | |
| - name: "Install: Required Dev Packages" | |
| run: | | |
| set -eux | |
| sudo bash ci/apt_install.sh --no-install-recommends \ | |
| libatomic-ops-dev \ | |
| libglu1-mesa-dev \ | |
| freeglut3-dev \ | |
| mesa-common-dev \ | |
| libglfw3-dev \ | |
| libfreetype6-dev \ | |
| libudev-dev \ | |
| libopenal-dev \ | |
| libvorbis-dev \ | |
| libflac-dev \ | |
| libx11-dev \ | |
| libdbus-1-dev \ | |
| libxrandr-dev \ | |
| libxcursor-dev \ | |
| libxinerama-dev \ | |
| libxi-dev | |
| # Its own sccache slot, same local-disk shape as the matrix cells: the release-modules | |
| # configure compiles a surface no matrix cell does (dasHV, dasLLVM, dasAudio, dasSQLITE, | |
| # dasGLFW, ...), so a matrix slot would serve it few hits. 2000M holds the full object set. | |
| - uses: mozilla-actions/sccache-action@v0.0.10 | |
| - run: | | |
| echo "SCCACHE_DIR=${{ runner.temp }}/sccache" >> $GITHUB_ENV | |
| echo "SCCACHE_GHA_ENABLED=false" >> $GITHUB_ENV | |
| echo "SCCACHE_CACHE_SIZE=2000M" >> $GITHUB_ENV | |
| echo "CMAKE_C_COMPILER_LAUNCHER=sccache" >> $GITHUB_ENV | |
| echo "CMAKE_CXX_COMPILER_LAUNCHER=sccache" >> $GITHUB_ENV | |
| # PRs restore read-only; the cron saves (the seeder), a master push saves too. | |
| - name: "Restore sccache objects" | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ${{ runner.temp }}/sccache | |
| key: sccache-bundle-linux-64-Release@${{ github.run_id }} | |
| restore-keys: sccache-bundle-linux-64-Release@ | |
| - name: "Build: Daslang with release modules" | |
| run: | | |
| set -eux | |
| mkdir build | |
| ACTIVE_MODULES=$(cat ci/release_modules.txt | grep -v "^#" | cut -d':' -f2 | sed 's|^|-D|' | xargs) | |
| CC=clang CXX=clang++ cmake --no-warn-unused-cli -B./build -DCMAKE_BUILD_TYPE:STRING=Release \ | |
| -G Ninja $ACTIVE_MODULES | |
| cmake --build ./build --config Release --parallel | |
| - name: "Save sccache objects" | |
| if: github.ref == 'refs/heads/master' | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: ${{ runner.temp }}/sccache | |
| key: sccache-bundle-linux-64-Release@${{ github.run_id }} | |
| - name: "Prune older sccache slots" | |
| if: github.ref == 'refs/heads/master' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| SCKEY: sccache-bundle-linux-64-Release@ | |
| run: | | |
| # best effort, and the newest entry survives whatever this run saved: a save that produced | |
| # nothing must not wipe the last good slot, and a listing hiccup must not fail the lane | |
| set +e | |
| gh cache list -R ${{ github.repository }} --key "$SCKEY" --limit 100 --json id,createdAt \ | |
| --jq 'sort_by(.createdAt) | reverse | .[1:] | .[].id' \ | |
| | while read -r id; do gh cache delete "$id" -R ${{ github.repository }}; done | |
| true | |
| - name: "Install and smoke-test the bundle" | |
| run: cmake --build ./build --config Release --target check_bundle_smoke --parallel | |
| ########################################################### | |
| build_linux_gcc: | |
| ########################################################### | |
| # Catches gcc-only -Werror breaks at PR time. Every Linux lane in this | |
| # workflow builds with CC=clang CXX=clang++, so warnings that only gcc emits | |
| # (glibc warn_unused_result on chdir/etc., -Wstringop-overflow / -Warray-bounds | |
| # / -Wmaybe-uninitialized false positives under -O3) are invisible to our own | |
| # CI and only ever surface downstream, where external module repos build | |
| # daslang from source with the default system g++ (e.g. dasImguiNodeEditor's | |
| # ubuntu-latest job). This job closes that gap. Compile-only: the clang lanes | |
| # already run the test sweeps; the point here is the strict-warning gate. | |
| # | |
| # Config mirrors the linux_arm lane (GLFW off, HV+SQLITE on); LLVM is left off | |
| # to keep this fast — its module also goes through DAS_APPLY_STRICT_WARNINGS, | |
| # but the LLVM build dominates walltime and the bulk of strict-compiled code | |
| # (core + HV/SQLITE/Audio/PUGIXML/UnitTest modules) is covered without it. | |
| ########################################################### | |
| needs: pre_job | |
| if: needs.pre_job.outputs.should_skip != 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "SCM Checkout" | |
| uses: actions/checkout@v4 | |
| # Pinned CMake + Ninja, matching the other Linux jobs (bison is preinstalled | |
| # on the ubuntu runners — the matrix linux64 job relies on it the same way). | |
| - name: "Get CMake + Ninja" | |
| uses: lukka/get-cmake@latest | |
| - name: "Build: Daslang (gcc -Werror)" | |
| run: | | |
| set -eux | |
| CC=gcc CXX=g++ cmake --no-warn-unused-cli -B./build-gcc -G Ninja \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DDAS_GLFW_DISABLED=ON \ | |
| -DDAS_HV_DISABLED=OFF \ | |
| -DDAS_SQLITE_DISABLED=OFF \ | |
| -DDAS_LLVM_DISABLED=ON | |
| cmake --build ./build-gcc --parallel |