-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
56 changed files
with
507 additions
and
1,580 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
name: Build and Test | ||
on: [ pull_request ] | ||
|
||
concurrency: | ||
group: tests-${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-and-run-tests: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- os: ubuntu-22.04 | ||
compiler: clang-17 | ||
runs-on: ${{ matrix.config.os }} | ||
name: ${{ matrix.config.os }} (${{ matrix.config.compiler }}) | ||
steps: | ||
- name: Install tools | ||
run: | | ||
sudo apt-get install -y wget unzip | ||
- name: Add repos for for gcc-13 and clang-17 | ||
run: | | ||
# gcc-13 | ||
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | ||
# clang-17 | ||
source /etc/os-release | ||
echo "deb http://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}-17 main" | sudo tee /etc/apt/sources.list.d/llvm-17.list | ||
curl https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/llvm.gpg > /dev/null | ||
- name: Ensure stdlib version | ||
run: | | ||
sudo apt-get install -y libstdc++-13-dev | ||
- name: Get minimum cmake version | ||
uses: lukka/get-cmake@latest | ||
with: | ||
cmakeVersion: 3.30.5 | ||
|
||
- name: Install compiler | ||
id: install_cc | ||
uses: rlalik/[email protected] | ||
with: | ||
compiler: ${{ matrix.config.compiler }} | ||
|
||
- name: Check compiler | ||
shell: bash | ||
env: | ||
CC: ${{ steps.install_cc.outputs.cc }} | ||
CXX: ${{ steps.install_cc.outputs.cxx }} | ||
run: | | ||
$CC --version | ||
$CXX --version | ||
- uses: rui314/setup-mold@v1 | ||
|
||
- name: install conan | ||
uses: dice-group/cpp-conan-release-reusable-workflow/.github/actions/configure_conan@main | ||
with: | ||
conan-version: 2.3.1 | ||
|
||
- name: add conan user | ||
run: | | ||
conan remote add -f dice-group https://conan.dice-research.org/artifactory/api/conan/tentris | ||
- name: Cache conan data | ||
id: cache-conan | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.conan/data | ||
key: ${{ matrix.config.os }}-${{ matrix.config.compiler }}-testing-conan | ||
|
||
- name: Cache torch | ||
id: cache-torch | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/libtorch | ||
key: cached-torch | ||
|
||
# note: newer versions of libtorch than 1.09.0 result in an "error: arithmetic on a pointer to an incomplete type 'c10::IValue'" when building with clang-14 and libstdc++-12 | ||
- name: Download torch | ||
if: steps.cache-torch.outputs.cache-hit != 'true' | ||
shell: bash | ||
run: | | ||
mkdir -p ~/.cache/ | ||
wget --continue --timestamping -O ~/.cache/libtorch-cxx11-abi-shared-with-deps-1.09.0+cpu.zip https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.9.0%2Bcpu.zip | ||
unzip ~/.cache/libtorch-cxx11-abi-shared-with-deps-1.09.0+cpu.zip -d ~/.cache | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get dependency provider | ||
uses: dice-group/cpp-conan-release-reusable-workflow/.github/actions/add_conan_provider@main | ||
|
||
- name: Configure CMake | ||
id: configure-cmake | ||
shell: bash | ||
env: | ||
CC: ${{ steps.install_cc.outputs.cc }} | ||
CXX: ${{ steps.install_cc.outputs.cxx }} | ||
run: | | ||
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES="conan_provider.cmake" -DCMAKE_CXX_FLAGS="-Wno-unused-command-line-argument -fuse-ld=mold -march=native" -DBUILD_TESTING=On -DLIBTORCH_PATH=~/.cache/libtorch -G Ninja -B build . | ||
- name: Build tests | ||
id: compile-tests | ||
shell: bash | ||
working-directory: build | ||
env: | ||
CC: ${{ steps.install_cc.outputs.cc }} | ||
CXX: ${{ steps.install_cc.outputs.cxx }} | ||
run: cmake --build . --parallel $(nproc) | ||
|
||
- name: Run tests | ||
id: run-tests | ||
shell: bash | ||
working-directory: build | ||
run: ctest --parallel $(nproc) --exclude-regex "(tests_RawHypertrieContext_systematic)|(tests_RawHypertrieContext_systematic_metall)|(tests_HypertrieContext_systematic_metall)|(tests_Einsum)|(tests_Einsum_metall)" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Publish Conan branch package | ||
|
||
on: [ push ] | ||
|
||
concurrency: | ||
group: publish-conan-branch-package-${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
publish-conan-branch-package: | ||
uses: dice-group/cpp-conan-release-reusable-workflow/.github/workflows/publish-conan-branch-package.yml@main | ||
with: | ||
public_artifactory: true | ||
os: ubuntu-22.04 | ||
compiler: clang-17 | ||
cmake-version: 3.30.5 | ||
conan-version: 2.9.3 | ||
conan-options: -o boost/*:header_only=True | ||
secrets: | ||
CONAN_USER: ${{ secrets.CONAN_USER }} | ||
CONAN_PW: ${{ secrets.CONAN_PW }} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Oops, something went wrong.