Linux-build #46
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
name: Linux-build | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: nvidia/cuda:11.8.0-devel-centos7 | |
steps: | |
- name: Install dependencies | |
run: | | |
yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm | |
yum -y install git curl zip unzip tar | |
yum -y groupinstall "Development tools" | |
yum install -y centos-release-scl | |
yum install -y devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-binutils | |
yum install kernel-devel -y | |
yum install perl-IPC-Cmd -y | |
git config --global --add safe.directory "*" | |
echo "PATH=/opt/rh/devtoolset-11/root/usr/bin:$PATH" >> $GITHUB_ENV | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Get CMake 3.29.0 | |
run: | | |
curl -L https://github.com/Kitware/CMake/releases/download/v3.29.0/cmake-3.29.0-linux-x86_64.sh -o cmake-install.sh | |
chmod +x cmake-install.sh | |
./cmake-install.sh --skip-license --prefix=/usr/local | |
- name: Restore from cache and setup vcpkg executable and data files. | |
uses: lukka/run-vcpkg@v11.1 | |
with: | |
runVcpkgInstall: true | |
vcpkgJsonGlob: 'vcpkg.json' | |
- name: Build | |
run: | | |
export CC=/opt/rh/devtoolset-11/root/usr/bin/gcc | |
export CXX=/opt/rh/devtoolset-11/root/usr/bin/g++ | |
c++ -v | |
gcc -v | |
g++ -v | |
./vcpkg/vcpkg integrate install | |
cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake | |
cmake --build build --config Release | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: xenblocksMiner-linux | |
path: build/bin |