Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
ChatDisabled authored Dec 6, 2024
2 parents f7e027f + 4e9f95f commit 07ed7d6
Show file tree
Hide file tree
Showing 84 changed files with 24,383 additions and 7,871 deletions.
54 changes: 47 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ jobs:
os: [ ubuntu-latest, windows-latest, macos-latest ]
name: Building, ${{ matrix.os }}
steps:

- name: Fix CRLF on Windows
if: runner.os == 'Windows'
run: git config --global core.autocrlf false
Expand All @@ -279,6 +280,10 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v4

- name: Setup Environment
shell: bash
run: echo "SHORT_SHA=`git rev-parse --short HEAD`" >> $GITHUB_ENV

- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
Expand All @@ -298,23 +303,58 @@ jobs:
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Build on Linux
if: runner.os == 'Linux'
run: |
cargo build --bin kaspa-ng --release
mkdir -p .debpkg/usr/bin
cp target/release/kaspa-ng .debpkg/usr/bin/
- name: Build on Windows
if: runner.os == 'Windows'
shell: bash
run: |
mkdir kaspa-ng-${{ env.SHORT_SHA }}-windows-x64 || true
cargo build --bin kaspa-ng --release
cp target/release/kaspa-ng.exe kaspa-ng-${{ env.SHORT_SHA }}-windows-x64/kaspa-ng.exe
cargo build --bin kaspa-ng --profile console --features console
cp target/release/kaspa-ng.exe kaspa-ng-${{ env.SHORT_SHA }}-windows-x64/kaspa-ng-console.exe
archive="kaspa-ng-${{ env.SHORT_SHA }}-windows-x64/kaspa-ng-${{ env.SHORT_SHA }}-windows-x64.zip"
powershell "Compress-Archive kaspa-ng-${{ env.SHORT_SHA }}-windows-x64/* \"${archive}\""
- name: Upload Windows build to GitHub
if: runner.os == 'Windows'
uses: actions/upload-artifact@v4
with:
name: kaspa-ng-${{ env.SHORT_SHA }}-windows-x64.zip
path: kaspa-ng-${{ env.SHORT_SHA }}-windows-x64/kaspa-ng-${{ env.SHORT_SHA }}-windows-x64.zip

- name: Build on MacOS
if: runner.os == 'macOS'
run: |
mkdir kaspa-ng-${{ env.SHORT_SHA }}-macos-arm64 || true
cargo build --bin kaspa-ng --release
cp target/release/kaspa-ng kaspa-ng-${{ env.SHORT_SHA }}-macos-arm64/
archive="kaspa-ng-${{ env.SHORT_SHA }}-macos-arm64/kaspa-ng-${{ env.SHORT_SHA }}-macos-arm64.zip"
zip -r "${archive}" ./kaspa-ng-${{ env.SHORT_SHA }}-macos-arm64/*
- name: Upload MacOS build to GitHub
if: runner.os == 'macOS'
uses: actions/upload-artifact@v4
with:
name: kaspa-ng-${{ env.SHORT_SHA }}-macos-arm64.zip
path: kaspa-ng-${{ env.SHORT_SHA }}-macos-arm64/kaspa-ng-${{ env.SHORT_SHA }}-macos-arm64.zip

- name: Build on Linux
if: runner.os == 'Linux'
run: |
mkdir kaspa-ng-${{ env.SHORT_SHA }}-linux-gnu-amd64 || true
cargo build --bin kaspa-ng --release
mkdir -p .debpkg/usr/bin
cp target/release/kaspa-ng .debpkg/usr/bin/
cp target/release/kaspa-ng kaspa-ng-${{ env.SHORT_SHA }}-linux-gnu-amd64/
archive="kaspa-ng-${{ env.SHORT_SHA }}-linux-gnu-amd64/kaspa-ng-${{ env.SHORT_SHA }}-linux-gnu-amd64.zip"
zip -r "${archive}" ./kaspa-ng-${{ env.SHORT_SHA }}-linux-gnu-amd64/*
- name: Upload Linux build to GitHub
if: runner.os == 'Linux'
uses: actions/upload-artifact@v4
with:
name: kaspa-ng-${{ env.SHORT_SHA }}-linux-gnu-amd64.zip
path: kaspa-ng-${{ env.SHORT_SHA }}-linux-gnu-amd64/kaspa-ng-${{ env.SHORT_SHA }}-linux-gnu-amd64.zip

- name: Package Debian Release
if: runner.os == 'Linux'
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@ jobs:
if: runner.os == 'Windows'
shell: bash
run: |
cargo build --bin kaspa-ng --release
mkdir kaspa-ng-${{ github.event.release.tag_name }}-windows-x64 || true
cargo build --bin kaspa-ng --release
cp target/release/kaspa-ng.exe kaspa-ng-${{ github.event.release.tag_name }}-windows-x64/
cargo build --bin kaspa-ng --profile console --features console
cp target/release/kaspa-ng.exe kaspa-ng-${{ github.event.release.tag_name }}-windows-x64/kaspa-ng-console.exe
archive="kaspa-ng-${{ github.event.release.tag_name }}-windows-x64/kaspa-ng-${{ github.event.release.tag_name }}-windows-x64.zip"
asset_name="kaspa-ng-${{ github.event.release.tag_name }}-windows-x64.zip"
powershell "Compress-Archive kaspa-ng-${{ github.event.release.tag_name }}-windows-x64/* \"${archive}\""
Expand Down
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ datadir
/discard
analyzer-target
.vscode/launch.json
/kaspa-ng.log
kaspa-ng*
kaspa-ng*
/.idea
*.log
kaspa-ng.log
Loading

0 comments on commit 07ed7d6

Please sign in to comment.