Skip to content

Commit

Permalink
Merge pull request #212 from skalenetwork/feature/move-to-ubuntu22
Browse files Browse the repository at this point in the history
feature/move to ubuntu22
  • Loading branch information
olehnikolaiev authored Nov 15, 2024
2 parents 530ba5a + 3ad8dc8 commit 3d2c678
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 139 deletions.
35 changes: 17 additions & 18 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
main_job:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
env:
NIGHTLY_BUILD_FLAGS: "valgrind --leak-check=yes"

Expand All @@ -31,39 +31,39 @@ jobs:
- name: Install packages
run: |
sudo apt-get install -y software-properties-common
sudo apt-get install -y gcc-9 g++-9
- name: use g++-9 by default
sudo apt-get install -y gcc-11 g++-11
- name: use g++-11 by default
run: |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 11
- name: Install more packages
run: |
sudo apt-get install -y gawk sed shtool \
libffi-dev yasm texinfo flex bison libgnutls28-dev libc6-dbg gcc-multilib
libffi-dev yasm texinfo libgnutls28-dev libc6-dbg gcc-multilib
sudo snap install valgrind --classic
python -m pip install --upgrade pip
pip install coincurve
- name: Build dependencies
run: |
export CC=gcc-9
export CXX=g++-9
export CC=gcc-11
export CXX=g++-11
export TARGET=all
cd deps
./build.sh
- name: Configure all
run: |
export CC=gcc-9
export CXX=g++-9
export CC=gcc-11
export CXX=g++-11
export TARGET=all
mkdir -p build && cd build
cmake ..
- name: Build all
run: |
export CC=gcc-9
export CXX=g++-9
export CC=gcc-11
export CXX=g++-11
export TARGET=all
cd build
make -j$(nproc)
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
./scripts/run_tools_test.sh
linux_build_with_emscripten:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

strategy:
matrix:
Expand All @@ -111,9 +111,8 @@ jobs:
- name: Install packages
run: |
sudo apt-get update
sudo apt-get install -y gcc-9 g++-9 gawk sed shtool \
libffi-dev yasm texinfo flex bison \
python3.6 lcov gcc-multilib
sudo apt-get install -y gcc-11 g++-11 gawk sed shtool \
libffi-dev yasm texinfo python3.6 lcov gcc-multilib
sudo apt-get update -qq
sudo apt-get install -y python3-pip
pip3 install --upgrade pip
Expand All @@ -128,8 +127,8 @@ jobs:

- name: Build dependencies
run: |
export CC=gcc-9
export CXX=g++-9
export CC=gcc-11
export CXX=g++-11
export TARGET=all
cd deps
./build.sh WITH_EMSCRIPTEN=1
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ defaults:
shell: bash
jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- name: Extract repo name
Expand All @@ -32,45 +32,45 @@ jobs:
- name: Install packages
run: |
sudo apt-get install -y software-properties-common
sudo apt-get install -y gcc-9 g++-9
- name: use g++-9 by default
sudo apt-get install -y gcc-11 g++-11
- name: use g++-11 by default
run: |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 11
- name: Install more packages
run: |
sudo apt-get update
sudo apt-get install -y clang-format-6.0 gawk sed shtool \
libffi-dev yasm texinfo flex bison libgnutls28-dev gcc-multilib
sudo apt-get install -y gawk sed shtool \
libffi-dev yasm texinfo libgnutls28-dev gcc-multilib
- name: Build dependencies
run: |
export CC=gcc-9
export CXX=g++-9
export CC=gcc-11
export CXX=g++-11
export TARGET=all
cd deps
./build.sh
- name: Configure
run: |
export CC=gcc-9
export CXX=g++-9
export CC=gcc-11
export CXX=g++-11
export TARGET=all
mkdir -p build && cd build
cmake ..
- name: Build
run: |
export CC=gcc-9
export CXX=g++-9
export CC=gcc-11
export CXX=g++-11
export TARGET=all
cd build
make -j$(nproc)
- name: Build dependencies wasm
run: |
export CC=gcc-9
export CXX=g++-9
export CC=gcc-11
export CXX=g++-11
export TARGET=all
cd deps
./clean.sh
Expand Down
45 changes: 21 additions & 24 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defaults:
shell: bash
jobs:
linux_build_and_test:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Extract repo name
run: echo ::set-env name=REPOSITORY_NAME::$(echo "$GITHUB_REPOSITORY" | awk -F /
Expand All @@ -27,20 +27,20 @@ jobs:
- name: install packages
run: |
sudo apt-get install -y software-properties-common
sudo apt-get install -y gcc-9 g++-9
- name: Use g++-9 and gcov-9 by default
sudo apt-get install -y gcc-11 g++-11
- name: Use g++-11 and gcov-11 by default
run: >
echo "Updating all needed alternatives"
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 11
sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-9 9
sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-11 11
sudo update-alternatives --install /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-9 9
sudo update-alternatives --install /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-11 11
sudo update-alternatives --install /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-9 9
sudo update-alternatives --install /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-11 11
echo "Checking alternative for gcc"
Expand Down Expand Up @@ -77,8 +77,8 @@ jobs:
run: >
sudo apt-get update
sudo apt-get install -y gcc-9 g++-9 gawk sed shtool \
libffi-dev yasm texinfo flex bison libgnutls28-dev python3 gcc-multilib git
sudo apt-get install -y gawk sed shtool \
libffi-dev yasm texinfo libgnutls28-dev python3 gcc-multilib git
sudo apt-get update -qq
sudo apt-get install -y python3-pip
Expand Down Expand Up @@ -123,24 +123,23 @@ jobs:
lcov --version
- name: Build dependencies
run: |
export CC=gcc-9
export CXX=g++-9
export CC=gcc-11
export CXX=g++-11
export TARGET=all
export CMAKE_BUILD_FLAGS="-DCOVERAGE=ON"
cd deps
./build.sh
- name: Configure all
run: |
export CC=gcc-9
export CXX=g++-9
export CC=gcc-11
export CXX=g++-11
export TARGET=all
CMAKE_BUILD_FLAGS="-DCOVERAGE=ON"
mkdir -p build && cd build
cmake $CMAKE_BUILD_FLAGS ..
- name: Build all
run: |
export CC=gcc-9
export CXX=g++-9
export CC=gcc-11
export CXX=g++-11
export TARGET=all
CMAKE_BUILD_FLAGS="-DCOVERAGE=ON"
cd build
Expand Down Expand Up @@ -177,7 +176,7 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.info
osx_build_and_test:
runs-on: macos-11
runs-on: macos-12
steps:
- name: Extract repo name
run: echo ::set-env name=REPOSITORY_NAME::$(echo "$GITHUB_REPOSITORY" | awk -F /
Expand Down Expand Up @@ -213,7 +212,7 @@ jobs:
./threshold_encryption/te_test
./dkg_attack
linux_build_with_emscripten:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
matrix:
node-version:
Expand All @@ -232,9 +231,7 @@ jobs:
- name: Install packages
run: |
sudo apt-get update
sudo apt-get install -y gcc-9 g++-9 gawk sed shtool \
libffi-dev yasm texinfo flex bison \
python3 gcc-multilib
sudo apt-get install -y gcc-11 g++-11 gawk sed shtool libffi-dev yasm texinfo python3 gcc-multilib
sudo apt-get update -qq
sudo apt-get install -y python3-pip
pip3 install --upgrade pip
Expand All @@ -247,8 +244,8 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: Build dependencies
run: |
export CC=gcc-9
export CXX=g++-9
export CC=gcc-11
export CXX=g++-11
export TARGET=all
cd deps
./build.sh WITH_EMSCRIPTEN=1
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ cd ..
## Building from source on Mac

```shell
brew install flex bison libtool automake cmake pkg-config yasm
brew install libtool automake cmake pkg-config yasm
# Configure the project and create a build directory.
cmake -H. -Bbuild

Expand All @@ -81,8 +81,8 @@ Ensure that the required packages are installed by executing:

```shell
sudo apt-get update
sudo apt-get install -y automake cmake build-essential libprocps-dev libtool\
pkg-config yasm texinfo autoconf flex bison clang-format-6.0
sudo apt-get install -y automake cmake build-essential libgnutls28-dev libtool\
pkg-config yasm texinfo autoconf clang-format-14
```

Configure the project build with the following commands.
Expand Down
Loading

0 comments on commit 3d2c678

Please sign in to comment.