Skip to content

Commit

Permalink
Merge pull request #10 from karlsen-network/mainnet_karlsenhashv2
Browse files Browse the repository at this point in the history
Mainnet karlsenhashv2
  • Loading branch information
lemois-1337 authored Aug 29, 2024
2 parents f761f1c + 967abeb commit c77ed3a
Show file tree
Hide file tree
Showing 61 changed files with 160,745 additions and 57,964 deletions.
409 changes: 259 additions & 150 deletions .github/workflows/ci.yaml

Large diffs are not rendered by default.

58 changes: 28 additions & 30 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,22 @@ jobs:
strategy:
fail-fast: false
matrix:
# Build gnu-linux on ubuntu-18.04 and musl on ubuntu latest
os: [ ubuntu-18.04, windows-latest, macos-latest ]
features: ["default", "kaspacuda/overclock "]
# Build gnu-linux on ubuntu-20.04 and musl on ubuntu latest
os: [ ubuntu-20.04, windows-latest, macos-latest ]
features: [ "karlsencuda/overclock" ]
name: Building, ${{ matrix.os }} ${{ matrix.features }}
steps:
- name: Fix CRLF on Windows
if: runner.os == 'Windows'
run: git config --global core.autocrlf false

- name: Fix LibOpenCL on Linux
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install ocl-icd-opencl-dev -y
- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install Protoc
uses: arduino/setup-protoc@v1
- name: Install protoc
uses: taiki-e/install-action@v2
with:
tool: protoc

- name: Setup Rust
uses: actions-rs/toolchain@v1
Expand All @@ -39,22 +35,22 @@ jobs:

- name: Install CUDA Linux
if: runner.os == 'Linux'
uses: Jimver/[email protected].8
uses: Jimver/[email protected].16
with:
cuda: '11.2.2'
cuda: '12.5.0'
method: 'network'
sub-packages: '["nvcc", "cudart"]'

- name: Install CUDA Windows
if: runner.os == 'Windows'
uses: Jimver/[email protected].8
uses: Jimver/[email protected].16
with:
cuda: '11.5.1'
cuda: '12.5.0'
method: 'network'
sub-packages: '["nvcc", "cudart"]'

- name: Build on Linux GNU
if: matrix.os == 'ubuntu-18.04'
if: matrix.os == 'ubuntu-20.04'
# We're using musl to make the binaries statically linked and portable
run: |
cargo build --target=x86_64-unknown-linux-gnu --release --all --features ${{ matrix.features }}
Expand All @@ -63,7 +59,7 @@ jobs:
strip ./target/x86_64-unknown-linux-gnu/release/karlsen-miner
mkdir ${asset_name}
mv ./target/x86_64-unknown-linux-gnu/release/karlsen-miner ${asset_name}/${asset_name}
mv ./target/x86_64-unknown-linux-gnu/release/libkaspa*.so ${asset_name}/
mv ./target/x86_64-unknown-linux-gnu/release/libkarlsen*.so ${asset_name}/
tar czvf ${asset_name}.tgz ${asset_name}
echo "archive=${asset_name}.tgz" >> $GITHUB_ENV
echo "asset_name=${asset_name}.tgz" >> $GITHUB_ENV
Expand All @@ -78,7 +74,7 @@ jobs:
asset_name="karlsen-miner-${{ github.event.release.tag_name }}-${feature_name/\//-}-win64-amd64"
mkdir ${asset_name}
mv ./target/x86_64-pc-windows-msvc/release/karlsen-miner.exe ${asset_name}/${asset_name}.exe
mv ./target/x86_64-pc-windows-msvc/release/kaspa*.dll ${asset_name}/
mv ./target/x86_64-pc-windows-msvc/release/karlsen*.dll ${asset_name}/
bash ./integrations/windows/create_bat.sh ${asset_name}
7z a -tzip -r ${asset_name}.zip ${asset_name}
echo "archive=${asset_name}.zip" >> $GITHUB_ENV
Expand All @@ -87,6 +83,7 @@ jobs:
- name: Build on MacOS
if: matrix.os == 'macos-latest'
run: |
rustup target add x86_64-apple-darwin
cargo build --target=x86_64-apple-darwin --release -p karlsen-miner
asset_name="karlsen-miner-${{ github.event.release.tag_name }}-cpu-only-osx-amd64"
mkdir ${asset_name}
Expand All @@ -107,24 +104,25 @@ jobs:
asset_content_type: application/zip

intergrations:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
# Build gnu-linux on ubuntu-18.04 and musl on ubuntu latest
# Build gnu-linux on ubuntu-20.04 and musl on ubuntu latest
itegration: [ hiveos ]
name: Integrating, ${{ matrix.itegration }}
steps:
- name: Fix LibOpenCL on Linux
- name: upgrade all the installed packages
run: |
sudo apt update
sudo apt install ocl-icd-opencl-dev -y
sudo apt update && sudo apt upgrade -y
- name: Check out code into the module directory
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install Protoc
uses: arduino/setup-protoc@v1
- name: Install protoc
uses: taiki-e/install-action@v2
with:
tool: protoc

- name: Setup Rust
uses: actions-rs/toolchain@v1
Expand All @@ -135,9 +133,9 @@ jobs:

- name: Install CUDA Linux
if: runner.os == 'Linux'
uses: Jimver/[email protected].8
uses: Jimver/[email protected].16
with:
cuda: '11.2.2'
cuda: '12.5.0'
method: 'network'
sub-packages: '["nvcc", "cudart"]'

Expand All @@ -149,7 +147,7 @@ jobs:
strip ./target/x86_64-unknown-linux-gnu/release/karlsen-miner
mkdir karlsen-miner
mv ./target/x86_64-unknown-linux-gnu/release/karlsen-miner karlsen-miner/${binary_name}
mv ./target/x86_64-unknown-linux-gnu/release/libkaspa*.so karlsen-miner/
mv ./target/x86_64-unknown-linux-gnu/release/libkarlsen*.so karlsen-miner/
bash integrations/${{ matrix.itegration }}/build.sh "${{ github.event.release.tag_name }}" "${binary_name}" karlsen-miner
echo "archive=${asset_name}.tgz" >> $GITHUB_ENV
echo "asset_name=${asset_name}.tgz" >> $GITHUB_ENV
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/target
dataset.bin
Loading

0 comments on commit c77ed3a

Please sign in to comment.