Skip to content

Commit

Permalink
Merge pull request ConcealNetwork#335 from AxVultis/actions/ubuntu-24
Browse files Browse the repository at this point in the history
Add Ubuntu 24.04
  • Loading branch information
AxVultis authored Aug 15, 2024
2 parents fa3f659 + 77ee589 commit af0c426
Show file tree
Hide file tree
Showing 2 changed files with 127 additions and 2 deletions.
74 changes: 72 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
run: |
cd build/conceal
./performance_tests.exe
- name: unit_tests
shell: powershell
run: |
Expand Down Expand Up @@ -167,7 +167,7 @@ jobs:
run: |
cd build/conceal
./performance_tests.exe
- name: unit_tests
shell: powershell
run: |
Expand Down Expand Up @@ -314,6 +314,76 @@ jobs:
cd build/tests
ctest -R UnitTests --output-on-failure
build-ubuntu24:
name: Ubuntu 24.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@master

- name: Prepare version
id: setup
run: |
os=ubuntu-24.04
ccx_version=${GITHUB_SHA::7}
release_name=ccx-cli-"$os"-dev-"$ccx_version"
echo "release_name=${release_name}" >> $GITHUB_OUTPUT
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y make cmake gcc g++ libboost-all-dev
- name: Build
id: build
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON -DSTATIC=ON
make -j2
- name: Prepare release
run: |
mkdir build/conceal
mv build/src/conceald build/conceal
mv build/src/concealwallet build/conceal
mv build/src/optimizer build/conceal
mv build/src/walletd build/conceal
cp build/tests/*_tests build/conceal
- name: Upload To GH Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ steps.setup.outputs.release_name }}
path: build/conceal
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: core_tests
run: |
cd build/conceal
./core_tests --generate_and_play_test_data
- name: difficulty_tests
run: |
cp tests/Difficulty/data.txt build/conceal
cd build/conceal
./difficulty_tests data.txt
- name: performance_tests
run: |
cd build/conceal
./performance_tests
- name: system_tests
run: |
cd build/conceal
./system_tests
- name: unit_tests
run: |
cd build/tests
ctest -R UnitTests --output-on-failure
build-ubuntu20-clang:
name: Ubuntu 20.04 clang
runs-on: ubuntu-20.04
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/ubuntu24.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Ubuntu 24.04

on:
push:
tags:
- "*"

jobs:
build-ubuntu24:
name: Ubuntu 24.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@master

- name: Build
id: build
run: |
sudo fallocate -l 6G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo apt-get update
sudo apt-get install -y libboost-all-dev
build_folder="build/debug"
ccx_version=$(echo "$GITHUB_REF" | sed 's|refs/tags/||')
ccx_ver_folder=$(echo $ccx_version | sed 's/\.//g')
release_name=ccx-cli-ubuntu-2404-v"$ccx_version"
mkdir -p "$build_folder"
cd "$build_folder"
cmake ../.. -DCMAKE_BUILD_TYPE=Release -DSTATIC=ON
make -j2
mkdir -p "$release_name/$ccx_ver_folder"
exeFiles=()
for f in src/*; do [[ -x $f && -f $f ]] && exeFiles+=( "$f" ); done
cp "${exeFiles[@]}" "$release_name/$ccx_ver_folder"
cd "$release_name"
tar -czf "$release_name".tar.gz "$ccx_ver_folder"
sha256=$(shasum -a 256 "$release_name".tar.gz | awk '{print toupper($1)}')
asset_path="./$build_folder/$release_name/$release_name.tar.gz"
echo "sha256=${sha256}" >> $GITHUB_OUTPUT
echo "release_name=${release_name}.tar.gz" >> $GITHUB_OUTPUT
echo "asset_path=${asset_path}" >> $GITHUB_OUTPUT
echo "ccx_version=${ccx_version}" >> $GITHUB_OUTPUT
- name: Create Release
uses: softprops/action-gh-release@v2.0.4
with:
files: ${{ steps.build.outputs.asset_path }}
name: Conceal Core CLI v${{ steps.build.outputs.ccx_version }}
body: |
[Download for Ubuntu 24.04](../../releases/download/${{ steps.build.outputs.ccx_version }}/${{ steps.build.outputs.release_name }}) **${{ steps.build.outputs.release_name }}**
`SHA256 : ${{ steps.build.outputs.sha256 }}`
append_body: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit af0c426

Please sign in to comment.