Skip to content

Add UnorderedMapIterator #4808

Add UnorderedMapIterator

Add UnorderedMapIterator #4808

Workflow file for this run

# C++ CI
name: C++ CI
on:
push:
paths-ignore:
- 'docs/**'
- 'media/**'
- '**.md'
pull_request:
branches:
- main
- feature/**
paths:
- 'docs/**'
- 'media/**'
- '**.md'
jobs:
build-linux:
name: C++ CI
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 11
- name: Setup Mold
uses: rui314/setup-mold@v1
- name: Setup CCache
uses: hendrikmuhs/ccache-action@v1
- name: Setup Dependencies
run: sudo apt-get install ninja-build graphviz pipx uuid-dev
# - name: Setup Valgrind
# if: github.event_name == 'pull_request'
# run: sudo apt-get install valgrind
- name: Setup Gcovr
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: sudo pipx install gcovr
- name: Cache LLVM
id: cache-llvm
uses: actions/cache@v4
with:
path: /home/runner/work/spice/llvm
key: llvm-18.1.7
- name: Setup LLVM
if: steps.cache-llvm.outputs.cache-hit != 'true'
run: |
cd ..
rm -rf llvm
git clone --depth 1 --branch llvmorg-18.1.7 https://github.com/llvm/llvm-project llvm
mkdir ./llvm/build
cd ./llvm/build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_CXX_FLAGS_RELEASE="-O2" -DLLVM_ENABLE_RTTI=ON -GNinja ../llvm
cmake --build .
- name: Download Libs
run: |
chmod +x setup-libs.sh
./setup-libs.sh
- name: Build Test target
# if: github.event_name != 'pull_request'
env:
LLVM_DIR: /home/runner/work/spice/llvm/build/lib/cmake/llvm
run: |
echo "/usr/lib/ccache:/usr/local/opt/ccache/libexec" >> $GITHUB_PATH
mkdir ./bin
cd ./bin
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DSPICE_BUILT_BY="ghactions" -DSPICE_LINK_STATIC=OFF -DSPICE_LTO=ON -DSPICE_RUN_COVERAGE=ON -GNinja -Wattributes ..
cmake --build . --target spicetest
# - name: Build Test target
# if: github.event_name == 'pull_request'
# env:
# LLVM_DIR: /home/runner/work/spice/llvm/build/lib/cmake/llvm
# run: |
# echo "/usr/lib/ccache:/usr/local/opt/ccache/libexec" >> $GITHUB_PATH
# mkdir ./bin
# cd ./bin
# cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DSPICE_BUILT_BY="ghactions" -DSPICE_PROF_COMPILE=ON -DSPICE_LINK_STATIC=OFF -DSPICE_RUN_COVERAGE=ON -GNinja -Wattributes ..
# cmake --build . --target spicetest
- name: Run Test target
# if: github.event_name != 'pull_request'
env:
LLVM_LIB_DIR: /home/runner/work/spice/llvm/build/lib
LLVM_INCLUDE_DIR: /home/runner/work/spice/llvm/llvm/include
LLVM_BUILD_INCLUDE_DIR: /home/runner/work/spice/llvm/build/include
SPICE_STD_DIR: /home/runner/work/spice/spice/std
SPICE_BOOTSTRAP_DIR: /home/runner/work/spice/spice/src-bootstrap
run: |
cd ./bin/test
./spicetest --skip-github-tests
# - name: Run Test target with Valgrind
# if: github.event_name == 'pull_request'
# env:
# LLVM_LIB_DIR: /home/runner/work/spice/llvm/build/lib
# LLVM_INCLUDE_DIR: /home/runner/work/spice/llvm/llvm/include
# LLVM_BUILD_INCLUDE_DIR: /home/runner/work/spice/llvm/build/include
# SPICE_STD_DIR: /home/runner/work/spice/spice/std
# SPICE_BOOTSTRAP_DIR: /home/runner/work/spice/spice/src-bootstrap
# run: |
# cd ./bin/test
# valgrind -q --leak-check=full ./spicetest --skip-github-tests --leak-detection
- name: Generate coverage report
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
cd ./bin
sudo chmod +x coverage.sh
./coverage.sh
- name: Upload coverage report - coverage.spicelang.com
uses: sebastianpopp/ftp-action@releases/v2
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
with:
host: ${{ secrets.FTP_SERVER }}
user: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
localDir: ./bin/coverage
remoteDir: chillibits.com/spice/coverage