Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps update and energy file bugfix. #66

Merged
merged 1 commit into from
Aug 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
205 changes: 105 additions & 100 deletions .github/workflows/supercell-cicd.yml
Original file line number Diff line number Diff line change
@@ -1,174 +1,179 @@
name: Build jobs
run-name:
run-name:
on:
push:
paths:
- 'src/**'
- 'lib/**'
- '3rd_party/**'
pull_request:
branches:
branches:
- master
release:
types: [published]

jobs:
build-develop-linux:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
compiler: [gcc-9, gcc-10, clang-11, clang-12, clang-13]
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
compiler: [gcc, gcc-9, gcc-10, gcc-11, gcc-12, gcc-13, clang]
include:
- os: ubuntu-latest
compiler: gcc
- os: ubuntu-latest
compiler: clang
- os: ubuntu-20.04
compiler: clang-11
- os: ubuntu-22.04
compiler: clang-13
- os: ubuntu-24.04
compiler: gcc-14
exclude:
- os: ubuntu-20.04
compiler: gcc-12
- os: ubuntu-20.04
compiler: gcc-13
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup C++
uses: aminya/setup-cpp@v0.21.0
uses: aminya/setup-cpp@v0.37.0
with:
compiler: ${{ matrix.compiler }}
cmake: true
make: true
- name: "Install dependencies"
run: "sudo apt update && sudo apt install -y
cmake build-essential libboost-test-dev libtinfo5 libtbb-dev
libarchive-dev libboost-program-options-dev libboost-filesystem-dev
libboost-system-dev libeigen3-dev liblzma-dev libbz2-dev zlib1g-dev zip"
run: |
sudo apt update && sudo apt install -y \
cmake build-essential libboost-test-dev libtbb-dev \
libarchive-dev libboost-program-options-dev libboost-filesystem-dev \
libboost-system-dev libeigen3-dev liblzma-dev libbz2-dev zlib1g-dev zip
- name: "Compile supercell."
run: cmake . -DCMAKE_BUILD_TYPE=Release && make supercell -j 2
run: cmake . -DCMAKE_BUILD_TYPE=Release && make supercell -j 4
- name: "Check supercell"
run: 'src/sc_cli/supercell -d -i ./data/examples/Ca2Al2SiO7/Ca2Al2SiO7.cif | grep -q "The total number of combinations is 6"'
deploy-build-macos:
strategy:
fail-fast: false
runs-on: macos-latest
runs-on: macos-13
steps:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
uses: Homebrew/actions/setup-homebrew@master
- name: "Install brew dependencies"
run: |
brew install boost eigen libarchive zlib
- name: "Get TBB"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: oneapi-src/oneTBB
ref: v2021.7.0
ref: v2021.13.0
path: ./tbb
submodules: true
- name: "Compile and install tbb"
working-directory: ./tbb
run: |
cmake . -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DTBB_TEST=OFF
make -j 2
make -j 4
sudo make install
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: ./supercell
submodules: true
- name: "Compile supercell."
working-directory: ./supercell
run: |
run: |
export PKG_CONFIG_PATH="/usr/local/opt/libarchive/lib/pkgconfig"
cmake . -DCMAKE_BUILD_TYPE=Release -DLINK_STATIC_LIBS=ON -DLibArchive_INCLUDE_DIR=/usr/local/opt/libarchive/include && make supercell -j 2
cmake . -DCMAKE_BUILD_TYPE=Release -DLINK_STATIC_LIBS=ON -DLibArchive_INCLUDE_DIR=/usr/local/opt/libarchive/include && make supercell -j 4
- name: "Check supercell"
working-directory: ./supercell
run: 'src/sc_cli/supercell -d -i ./data/examples/Ca2Al2SiO7/Ca2Al2SiO7.cif | grep -q "The total number of combinations is 6"'
- name: "Check supercell dynamic libs."
working-directory: ./supercell
run: 'otool -l src/sc_cli/supercell'
- name: Upload Supercell
uses: actions/upload-artifact@v3.1.1
uses: actions/upload-artifact@v4
with:
name: macos-bin
path: ./supercell/src/sc_cli/supercell
path: ./supercell/src/sc_cli/supercell
deploy-build-linux:
strategy:
fail-fast: false
runs-on: ubuntu-latest
container: ubuntu:18.04
runs-on: ubuntu-20.04
steps:
- name: "Install dependencies"
run: |
apt-get update && apt-get full-upgrade -y
apt-get install -y software-properties-common wget tar cmake build-essential \
ccache libboost-program-options-dev libboost-filesystem-dev libboost-test-dev \
libarchive-dev liblzma-dev libbz2-dev zlib1g-dev zip libboost-system-dev
add-apt-repository ppa:git-core/ppa
add-apt-repository ppa:ubuntu-toolchain-r/test
apt-get update
apt-get install -y git gcc-9 g++-9
- name: Cache
uses: pat-s/always-upload-cache@v3.0.11
with:
path: /github/home/.ccache
key: linux-deploy-cache-${{ github.run_id }} # Can use time based key as well
restore-keys: |
linux-deploy-cache-
- name: "Compile and install dependencies"
run: |
ccache -s
export CC=gcc-9
export CXX=g++-9
export PATH="/usr/lib/ccache:$PATH"
export BASE_DIR=${PWD}
mkdir eigen && cd eigen
wget -nv https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz -O - | tar -zxf -
mkdir build && cd build
cmake ../eigen-3.4.0
make install
cd $BASE_DIR
git clone https://github.com/oneapi-src/oneTBB.git
cd oneTBB && git checkout v2021.7.0
mkdir cmake-build && cd cmake-build
cmake ../ -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DTBB_TEST=OFF
make -j 2 && make install
cd $BASE_DIR
wget -nv https://github.com/libarchive/libarchive/releases/download/v3.6.1/libarchive-3.6.1.tar.gz -O - | tar -zxf -
cd libarchive-3.6.1
./configure --without-openssl --without-libb2 --without-xml2 --without-expat --disable-bsdtar
sed -ir '/^.*#define HAVE_LZMA_STREAM_ENCODER_MT 1.*$/d' config.h
make -j 2
make install
cd $BASE_DIR
- name: "Clone supercell"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: ./supercell
submodules: true
- name: "Compile and install supercell"
run: |
export CC=gcc-9
export CXX=g++-9
export PATH="/usr/lib/ccache:$PATH"
cd supercell
cmake . -DCMAKE_BUILD_TYPE=Release -DLINK_STATIC_LIBS=ON && make supercell -j 2
ccache -s
- name: "Test supercell"
run: |
supercell/src/sc_cli/supercell -d -i supercell/data/examples/Ca2Al2SiO7/Ca2Al2SiO7.cif | grep -q "The total number of combinations is 6"
- name: Upload Supercell
uses: actions/upload-artifact@v3.1.1
- name: "Clone oneTBB"
uses: actions/checkout@v4
with:
repository: oneapi-src/oneTBB
ref: v2021.13.0
path: ./oneTBB
submodules: true
- name: "Compile supercell with deps"
uses: addnab/docker-run-action@v3
with:
image: ubuntu:18.04
options: -v ${{ github.workspace }}:/work
run: |
apt-get update && apt-get full-upgrade -y
apt-get install -y software-properties-common wget tar cmake build-essential \
libboost-program-options-dev libboost-filesystem-dev libboost-test-dev \
libarchive-dev liblzma-dev libbz2-dev zlib1g-dev zip libboost-system-dev
add-apt-repository ppa:git-core/ppa
add-apt-repository ppa:ubuntu-toolchain-r/test
apt-get update
apt-get install -y git gcc-9 g++-9
export CC=gcc-9
export CXX=g++-9
export BASE_DIR="/work"
mkdir ${BASE_DIR}/eigen && cd ${BASE_DIR}/eigen
wget -nv https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz -O - | tar -zxf -
mkdir build && cd build
cmake ../eigen-3.4.0
make install
cd $BASE_DIR/oneTBB
mkdir cmake-build && cd cmake-build
cmake ../ -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DTBB_TEST=OFF
make -j 4 && make install
wget -nv https://github.com/libarchive/libarchive/releases/download/v3.7.4/libarchive-3.7.4.tar.gz -O - | tar -zxf -
cd libarchive-3.7.4
./configure --without-openssl --without-libb2 --without-xml2 --without-expat --disable-bsdtar
sed -ir '/^.*#define HAVE_LZMA_STREAM_ENCODER_MT 1.*$/d' config.h
make -j 4
make install
cd $BASE_DIR/supercell
cmake . -DCMAKE_BUILD_TYPE=Release -DLINK_STATIC_LIBS=ON && make supercell -j 4
$BASE_DIR/supercell/src/sc_cli/supercell -d -i $BASE_DIR/supercell/data/examples/Ca2Al2SiO7/Ca2Al2SiO7.cif | grep -q "The total number of combinations is 6"
- name: Upload Supercell
uses: actions/upload-artifact@v4
with:
name: linux-bin
path: ./supercell/src/sc_cli/supercell
deploy-build-windows:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: "Install dependencies"
run: |
sudo apt update && sudo apt -y full-upgrade
sudo apt install -y gcc cmake build-essential wine-stable autopoint gperf intltool libtool libtool-bin lzip p7zip-full python3 python3-mako
- name: "Download MXE"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: mxe/mxe
path: ./mxe
submodules: true
- name: Cache
uses: pat-s/always-upload-cache@v3.0.11
uses: actions/cache@v4
with:
save-always: true
path: ./mxe/.ccache
key: win-cache-${{ github.run_id }} # Can use time based key as well
restore-keys: |
Expand All @@ -177,14 +182,14 @@ jobs:
working-directory: ./mxe
run: |
sed -i -r 's/ nettle / /g' src/libarchive.mk && sed -i -r 's/with-nettle/without-nettle --without-openssl --without-iconv /g' src/libarchive.mk
make MXE_TARGETS=x86_64-w64-mingw32.static MXE_PLUGIN_DIRS=plugins/gcc10 ccache
make MXE_TARGETS=x86_64-w64-mingw32.static MXE_PLUGIN_DIRS=plugins/gcc13 ccache
echo 'max_size = 15.0G' > .ccache/ccache/ccache.conf
.ccache/bin/ccache -s
make MXE_TARGETS=x86_64-w64-mingw32.static MXE_PLUGIN_DIRS=plugins/gcc10 ccache cc cmake intel-tbb boost eigen libarchive --jobs=4 JOBS=2
.ccache/bin/ccache -s
make MXE_TARGETS=x86_64-w64-mingw32.static MXE_PLUGIN_DIRS=plugins/gcc13 ccache cc cmake intel-tbb boost eigen libarchive --jobs=4 JOBS=4
.ccache/bin/ccache -s
echo "${PWD}/usr/bin" >> $GITHUB_PATH
- name: "Clone supercell"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: ./supercell
submodules: true
Expand All @@ -196,34 +201,34 @@ jobs:
- name: "Run supercell"
working-directory: ./supercell
run: 'wine64 src/sc_cli/supercell.exe -d -i ./data/examples/Ca2Al2SiO7/Ca2Al2SiO7.cif | grep -q "The total number of combinations is 6"'
- name: Upload Supercell
uses: actions/upload-artifact@v3.1.1
- name: Upload Supercell
uses: actions/upload-artifact@v4
with:
name: windows-bin
path: ./supercell/src/sc_cli/supercell.exe

deploy-to-site:
if: github.event_name == 'release'
needs: [deploy-build-linux, deploy-build-macos, deploy-build-windows]
needs: [ deploy-build-linux, deploy-build-macos, deploy-build-windows ]
runs-on: ubuntu-latest
steps:
- name: "Install dependencies"
run: |
sudo apt-get update && sudo apt-get full-upgrade -y
sudo apt-get update
sudo apt-get install -y git wget tar openssh-client zip
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: linux-bin
path: ./art/linux
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: windows-bin
path: ./art/windows
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: macos-bin
path: ./art/osx
path: ./art/osx
- name: "Deploy to file"
env:
SITE_REPO_KEY: ${{ secrets.DEPLOY_KEY }}
Expand All @@ -234,11 +239,11 @@ jobs:
DEPLOY_REPO="git@github.com:orex/orex.github.io.git"
DEPLOY_BRANCH="master"
DEPLOY_DIR="supercell/external"
#
#
mkdir ~/.ssh
eval `ssh-agent -s`
echo "${SITE_REPO_KEY}" | ssh-add -
ssh-keyscan -t rsa github.com > ~/.ssh/known_hosts
ssh-keyscan -t rsa github.com > ~/.ssh/known_hosts
# Clone the existing gh-pages for this repo into out/
# Create a new empty branch if gh-pages doesn't exist yet (should only happen on first deply)
git clone --recurse-submodules "${DEPLOY_REPO}" --branch "${DEPLOY_BRANCH}" out && cd out
Expand All @@ -249,7 +254,7 @@ jobs:
#Main code
mkdir -p "${REPO_PATH}/${DEPLOY_DIR}/exe/."
cd `mktemp -d -t XXXXXX`
wget -nv https://github.com/orex/supercell/raw/deploy/README -O README
wget -nv https://github.com/orex/supercell/raw/deploy/README -O README
for i in ${ART_DIR}/*
do
cp -a "${i}"/* .
Expand All @@ -274,4 +279,4 @@ jobs:
git status
git commit -m "Deploy to GitHub Pages: ${GITHUB_SHA}"
# Now that we're all set up, we can push.
git push $DEPLOY_REPO $DEPLOY_BRANCH
git push $DEPLOY_REPO $DEPLOY_BRANCH
2 changes: 1 addition & 1 deletion 3rd_party/gemmi
Submodule gemmi updated 515 files
2 changes: 1 addition & 1 deletion 3rd_party/xxHash
Submodule xxHash updated 58 files
+7 −0 .github/dependabot.yml
+243 −52 .github/workflows/ci.yml
+5 −0 .gitignore
+24 −0 CHANGELOG
+9 −4 Doxyfile
+63 −0 Doxyfile-internal
+1 −1 LICENSE
+114 −20 Makefile
+35 −18 README.md
+13 −0 SECURITY.md
+3 −0 cli/.tipi/deps
+0 −0 cli/.tipi/opts
+24 −8 cli/xsum_arch.h
+13 −1 cli/xsum_bench.c
+30 −4 cli/xsum_os_specific.c
+1 −1 cli/xsum_os_specific.h
+2 −1 cli/xsum_output.c
+1 −1 cli/xsum_output.h
+30 −28 cli/xsum_sanity_check.c
+1 −1 cli/xsum_sanity_check.h
+31 −17 cli/xxhsum.1
+33 −27 cli/xxhsum.1.md
+229 −22 cli/xxhsum.c
+49 −11 cmake_unofficial/CMakeLists.txt
+23 −0 cmake_unofficial/JoinPaths.cmake
+1 −0 cmake_unofficial/README.md
+474 −5 doc/xxhash_spec.md
+3 −3 libxxhash.pc.in
+25 −2 tests/Makefile
+1 −1 tests/bench/Makefile
+3 −1 tests/bench/benchHash.c
+1 −1 tests/bench/benchHash.h
+2 −1 tests/bench/benchfn.c
+1 −1 tests/bench/benchfn.h
+1 −1 tests/bench/bhDisplay.c
+1 −1 tests/bench/bhDisplay.h
+1 −1 tests/bench/hashes.h
+1 −1 tests/bench/main.c
+1 −1 tests/bench/timefn.c
+1 −1 tests/bench/timefn.h
+32 −0 tests/cli-comment-line.sh
+51 −0 tests/cli-ignore-missing.sh
+1 −1 tests/collisions/Makefile
+1 −1 tests/collisions/hashes.h
+2 −2 tests/collisions/main.c
+1 −1 tests/collisions/pool.c
+1 −1 tests/collisions/pool.h
+1 −1 tests/collisions/sort.cc
+1 −1 tests/collisions/sort.hh
+21 −0 tests/filename-escape.sh
+763 −0 tests/sanity_test.c
+45,832 −0 tests/sanity_test_vectors.h
+464 −0 tests/sanity_test_vectors_generator.c
+1 −1 xxh3.h
+145 −70 xxh_x86dispatch.c
+9 −10 xxh_x86dispatch.h
+1 −1 xxhash.c
+2,108 −915 xxhash.h
Loading
Loading