Update c-cicd.yml #152
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: C/C++ CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
release: | |
types: [created] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Create ccminer Artifact Folder | |
run: | | |
mkdir ~/ccminer | |
- name: Set up arm-runner-action | |
uses: pguyot/arm-runner-action@v2 | |
with: | |
base_image: raspios_lite_arm64:latest | |
cpu: cortex-a53 | |
image_additional_mb: 16384 | |
copy_artifact_path: CCminer-ARM-optimized/ccminerzip/ | |
copy_artifact_dest: ~/ccminer/ | |
commands: | | |
sudo apt-get update | |
sudo apt install -y software-properties-common | |
sudo apt-get install libcurl4-openssl-dev libssl-dev libjansson-dev automake autotools-dev build-essential git make cmake curl wget whois -y | |
wget https://apt.llvm.org/llvm.sh | |
chmod +x llvm.sh | |
sudo ./llvm.sh 16 | |
sudo ln -sf /usr/lib/llvm-16/bin/clang-16 /usr/bin/clang | |
sudo ln -sf /usr/lib/llvm-16/bin/clang++ /usr/bin/clang++ | |
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-16 100 | |
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-16 100 | |
sudo update-alternatives --config cc | |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main' | |
sudo apt update | |
sudo apt-get install -y libllvm-16-ocaml-dev libllvm16 llvm-16 llvm-16-dev llvm-16-doc llvm-16-examples llvm-16-runtime clang-16 clang-tools-16 clang-16-doc libclang-common-16-dev libclang-16-dev libclang1-16 clang-format-16 python3-clang-16 clangd-16 clang-tidy-16 libclang-rt-16-dev libpolly-16-dev libfuzzer-16-dev lldb-16 lld-16 libc++-16-dev libc++abi-16-dev libomp-16-dev libclc-16-dev libunwind-16-dev libmlir-16-dev mlir-16-tools flang-16 libclang-rt-16-dev-wasm32 libclang-rt-16-dev-wasm64 libclang-rt-16-dev-wasm32 libclang-rt-16-dev-wasm64 | true | |
sudo apt install -f | |
sudo ln -sf /usr/lib/llvm-16/bin/clang-16 /usr/bin/clang | |
sudo ln -sf /usr/lib/llvm-16/bin/clang++ /usr/bin/clang++ | |
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-16 100 | |
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-16 100 | |
sudo update-alternatives --config cc | |
# Clone repository and build | |
git clone https://github.com/simeononsecurity/CCminer-ARM-optimized.git | |
cd CCminer-ARM-optimized | |
chmod +x build.sh | |
chmod +x configure.sh | |
chmod +x github-action.sh | |
chmod +x autogen.sh | |
CXX=clang++ CC=clang ./github-action.sh | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
if: github.ref == 'refs/heads/releng' || startsWith(github.ref, 'refs/tags/') | |
with: | |
if-no-files-found: error | |
path: ~/ccminer/ccminer*.zip |