Skip to content

Commit

Permalink
add fastlanes expression encoding for type int64_t
Browse files Browse the repository at this point in the history
  • Loading branch information
azimafroozeh committed Sep 14, 2024
1 parent 5feb61d commit a899c38
Show file tree
Hide file tree
Showing 1,538 changed files with 266,084 additions and 191 deletions.
25 changes: 20 additions & 5 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Checks: '-*,
clang-diagnostic-*,
bugprone-*,
performance-*,
performance-inefficient-vector-operation,
cert-*,
Expand Down Expand Up @@ -41,21 +40,36 @@ misc-throw-by-value-catch-by-reference,
google-global-names-in-headers,
llvm-header-guard,
misc-definitions-in-headers,
readability-container-size-empty'
readability-container-size-empty,
clang-analyzer-core.NonNullParamChecker,
clang-analyzer-core.BitwiseShift,
'

WarningsAsErrors: '*'
AnalyzeTemporaryDtors: false
FormatStyle: none

ExtraArgs:
# clang-tidy 17 started to complain (for unknown reasons) that various pragmas are unknown ("clang-diagnostic-unknown-pragmas").
# This is technically a compiler error, not a clang-tidy error. We could litter the code base with more pragmas that suppress
# this error but it is better to pass the following flag to the compiler:
- '-Wno-unknown-pragmas'
- '-Wno-unused-command-line-argument' # similar issue

CheckOptions:
# https://stackoverflow.com/questions/68475958/clang-tidy-emits-warning-when-compiling-with-c20-enabled
- key: readability-identifier-naming.TypeTemplateParameterIgnoredRegexp
value: expr-type
- key: readability-identifier-naming.ClassCase
value: aNy_Case
value: aNy_CasE
- key: readability-identifier-naming.EnumCase
value: CamelCase
- key: readability-identifier-naming.TypedefCase
value: lower_case
- key: readability-identifier-naming.TypedefSuffix
value: _t
- key: readability-identifier-naming.FunctionCase
value: aNy_Case
value: aNy_CasE
- key: readability-identifier-naming.MemberCase
value: lower_case
- key: readability-identifier-naming.ParameterCase
Expand Down Expand Up @@ -91,4 +105,5 @@ CheckOptions:
- key: readability-identifier-naming.PrivateMemberPrefix
value: "m_"
- key: readability-identifier-naming.PrivateMethodCase
value: lower_case
value: lower_case

260 changes: 260 additions & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,260 @@
name: CI
run-name: "${{ github.actor }} - ${{ github.event.head_commit.message }}"

on: push

jobs:
check-format:
strategy:
fail-fast: true
matrix:
platform: [ ubuntu-latest ]
runs-on: ${{ matrix.platform }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: run-clang-format
run: python3 scripts/run-clang-format.py -r example include src benchmark test data/include --exclude include/fls/json/nlohmann

build:
needs:
- check-format
strategy:
fail-fast: false
matrix:
platform: [ ubuntu-latest, macos-latest, president, windows-latest ]
build_type: [ Debug, Release ]
cxx: [ clang++ ]

runs-on: ${{ matrix.platform }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Make directory build
run: mkdir ${{github.workspace}}/build_${{ matrix.build_type }}

- name: Install LLVM on macos
if: matrix.platform == 'macos-latest'
run: |
brew install llvm
- name: Add LLVM to path on macos
if: matrix.platform == 'macos-latest'
run: |
echo "/opt/homebrew/opt/llvm/bin" >> $GITHUB_PATH
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
clang-tidy --version
- name: Install Chocolatey
if: matrix.platform == 'windows-latest'
run: |
Set-ExecutionPolicy Bypass -Scope Process -Force;
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
- name: Install Ninja on Windows
if: matrix.platform == 'windows-latest'
run: choco install ninja -y

# Verify Ninja installation on all platforms
- name: Verify Ninja installation
if: matrix.platform == 'windows-latest'
run: ninja --version

- name: Install Clang (with clang++)
if: matrix.platform == 'windows-latest'
run: choco install llvm -y

- name: Verify Clang++ installation
if: matrix.platform == 'windows-latest'
run: clang++ --version && lld-link --version

- name: Configure CMake
if: matrix.platform != 'windows-latest'
run: |
cmake -S ${{github.workspace}} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -B ${{github.workspace}}/build_${{ matrix.build_type }} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
env:
CXX: ${{ matrix.cxx }}

- name: Configure CMake
if: matrix.platform == 'windows-latest'
run: |
cmake -S ${{github.workspace}} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -B ${{github.workspace}}/build_${{ matrix.build_type }} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -G "Ninja" -DCMAKE_CXX_FLAGS="-target x86_64-w64-windows-gnu"
env:
CXX: ${{ matrix.cxx }}

- name: Build
run: cmake --build ${{github.workspace}}/build_${{ matrix.build_type }} -j 10

build-iwyu:
needs:
- build
strategy:
fail-fast: true
matrix:
platform: [ president ]
build_type: [ Release, Debug ]
cxx: [ clang++ ]
runs-on: ${{ matrix.platform }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Make directory build
run: mkdir ${{github.workspace}}/build_iwyu_${{ matrix.build_type }}

- name: Configure CMake
run: cmake -S ${{github.workspace}} -DFLS_ENABLE_IWYU=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -B ${{github.workspace}}/build_iwyu_${{ matrix.build_type }}
env:
CXX: ${{ matrix.cxx }}

- name: Build
run: cmake --build ${{github.workspace}}/build_iwyu_${{ matrix.build_type }} -j 10

generate_dataset:
needs: [ build ]
if: success()

strategy:
fail-fast: true
matrix:
platform: [ ubuntu-latest, macos-latest, president, windows-latest ]
python-version: [ 3.12.4 ] # Python 3 versions

runs-on: ${{ matrix.platform }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }} # Set Python 3.x version

- name: Install dependencies
run: |
python -m pip install --upgrade pip # Upgrade pip
pip install faker # Install faker
- name: generate data
run: cd ${{github.workspace}}/scripts/; python3 generate_synthetic_data.py

example:
needs:
- build
strategy:
fail-fast: false
matrix:
platform: [ ubuntu-latest, macos-latest ] # fixme, try windows-latest
build_type: [ Debug ]
cc: [ clang ]
cxx: [ clang++ ]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Make directory build
run: mkdir ${{github.workspace}}/build_${{ matrix.build_type }}

- name: Install LLVM on macos
if: matrix.platform == 'macos-latest'
run: |
brew install llvm
- name: Add LLVM to path on macos
if: matrix.platform == 'macos-latest'
run: |
echo "/opt/homebrew/opt/llvm/bin" >> $GITHUB_PATH
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
clang-tidy --version
- name: Install Chocolatey
if: matrix.platform == 'windows-latest'
run: |
Set-ExecutionPolicy Bypass -Scope Process -Force;
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
- name: Install Ninja on Windows
if: matrix.platform == 'windows-latest'
run: choco install ninja -y

# Verify Ninja installation on all platforms
- name: Verify Ninja installation
if: matrix.platform == 'windows-latest'
run: ninja --version

- name: Install Clang (with clang++)
if: matrix.platform == 'windows-latest'
run: choco install llvm -y

- name: Verify Clang++ installation
if: matrix.platform == 'windows-latest'
run: clang++ --version

- name: Configure CMake
if: matrix.platform != 'windows-latest'
run: |
cmake -S ${{github.workspace}} -DFLS_BUILD_EXAMPLE=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -B ${{github.workspace}}/build_${{ matrix.build_type }} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
env:
CXX: ${{ matrix.cxx }}

- name: Configure CMake
if: matrix.platform == 'windows-latest'
run: |
cmake -S ${{github.workspace}} -DFLS_BUILD_EXAMPLE=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -B ${{github.workspace}}/build_${{ matrix.build_type }} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -G "Ninja" -DCMAKE_CXX_FLAGS="-target x86_64-w64-windows-gnu"
env:
CXX: ${{ matrix.cxx }}

- name: Build
run: cmake --build ${{github.workspace}}/build_${{ matrix.build_type }} -j 10

- name: run cpp_example
run: ${{github.workspace}}/build_${{ matrix.build_type }}/example/cpp_example

test:
needs:
- example
strategy:
fail-fast: true
matrix:
platform: [ president ]
build_type: [ Release ] # TODO : ADD DEBUG
cxx: [ clang++ ]
runs-on: ${{ matrix.platform }}

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Make directory build
run: mkdir ${{github.workspace}}/test_build_${{ matrix.build_type }}

- name: Configure CMake
run: cmake -DFLS_BUILD_TESTING=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -S ${{github.workspace}} -B ${{github.workspace}}/test_build_${{ matrix.build_type }}
env:
CXX: ${{ matrix.cxx }}

- name: Build
run: cmake --build ${{github.workspace}}/test_build_${{ matrix.build_type }} -j 10

- name: Test
working-directory: ${{github.workspace}}/test_build_${{ matrix.build_type }}
run: ctest -j 10 --stop-on-failure --output-on-failure --timeout 5000







25 changes: 23 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
thirdparty/*.tar*
CMakeFiles/
CMakeCache.txt
Expand Down Expand Up @@ -31,7 +32,6 @@ tmp

######################################### from the fls_benchamrks integration
.vagrant/
compile_commands.json
*.pdf
plot/*.log
plot/*.tex
Expand Down Expand Up @@ -68,4 +68,25 @@ plot/*.tex
# Executables
*.exe
*.out
*.app
*.app

# System files
/.run
.DS_Store
._.DS_Store
**/.DS_Store
**/._.DS_Store

# Project related
/paper/dataset_lib/__pycache__
/_deps
/.cmake
*.ninja
/test/local_result
DartConfiguration.tcl
paper/dataset_lib/compress_bi_py.db
paper/dataset_lib/compress_bi_py.orc
paper/dataset_lib/compress_bi_py.pq
paper/dataset_lib/compress_bi_py.db
paper/dataset_lib/compress_bi_py.orc
DartConfiguration.tcl
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

5 changes: 0 additions & 5 deletions .pre-commit-config.yaml

This file was deleted.

Loading

0 comments on commit a899c38

Please sign in to comment.