mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-12-22 11:29:23 +00:00
CI: faster builds
Update c-cpp.yml
This commit is contained in:
parent
b99b1689b7
commit
cf165af025
1 changed files with 22 additions and 18 deletions
40
.github/workflows/c-cpp.yml
vendored
40
.github/workflows/c-cpp.yml
vendored
|
@ -18,9 +18,9 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
config:
|
config:
|
||||||
- {arch: x86_64, branch: latest-stable, flags: "-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline"}
|
- {arch: x86_64, branch: latest-stable, flags: "-flto=auto -fuse-linker-plugin -ffunction-sections -Wno-error=inline"}
|
||||||
- {arch: aarch64, branch: latest-stable, flags: "-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline -mfix-cortex-a53-835769 -mfix-cortex-a53-843419"}
|
- {arch: aarch64, branch: latest-stable, flags: "-flto=auto -fuse-linker-plugin -ffunction-sections -Wno-error=inline -mfix-cortex-a53-835769 -mfix-cortex-a53-843419"}
|
||||||
- {arch: riscv64, branch: edge, flags: "-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline"}
|
- {arch: riscv64, branch: edge, flags: "-flto=auto -fuse-linker-plugin -ffunction-sections -Wno-error=inline"}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Alpine Linux
|
- name: Setup Alpine Linux
|
||||||
|
@ -137,7 +137,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake .. -DCMAKE_C_COMPILER=${{ matrix.config.c }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cpp }} -DCMAKE_C_FLAGS='${{ matrix.config.flags }} -flto=2' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }} -flto=2'
|
cmake .. -DCMAKE_C_COMPILER=${{ matrix.config.c }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cpp }} -DCMAKE_C_FLAGS='${{ matrix.config.flags }} -flto=auto' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }} -flto=auto'
|
||||||
make -j$(nproc) p2pool
|
make -j$(nproc) p2pool
|
||||||
|
|
||||||
- name: Run RandomX tests
|
- name: Run RandomX tests
|
||||||
|
@ -152,7 +152,7 @@ jobs:
|
||||||
cd tests
|
cd tests
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake .. -DCMAKE_C_COMPILER=${{ matrix.config.c }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cpp }} -DCMAKE_C_FLAGS='${{ matrix.config.flags }} -flto=2' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }} -flto=2'
|
cmake .. -DCMAKE_C_COMPILER=${{ matrix.config.c }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cpp }} -DCMAKE_C_FLAGS='${{ matrix.config.flags }} -flto=auto' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }} -flto=auto'
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
|
@ -175,7 +175,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
config:
|
config:
|
||||||
- {flags: "-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline"}
|
- {flags: "-flto=auto -fuse-linker-plugin -ffunction-sections -Wno-error=inline"}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
@ -255,8 +255,8 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
config:
|
config:
|
||||||
- {os: ubuntu-20.04, flags: "-flto=2 -fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419"}
|
- {os: ubuntu-20.04, flags: "-flto=auto -fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419"}
|
||||||
- {os: ubuntu-22.04, flags: "-flto=2 -fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419"}
|
- {os: ubuntu-22.04, flags: "-flto=auto -fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419"}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
@ -627,7 +627,7 @@ jobs:
|
||||||
- name: freebsd
|
- name: freebsd
|
||||||
architecture: x86-64
|
architecture: x86-64
|
||||||
version: '13.2'
|
version: '13.2'
|
||||||
host: macos-latest
|
host: macos-13
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
|
@ -646,36 +646,38 @@ jobs:
|
||||||
operating_system: ${{ matrix.os.name }}
|
operating_system: ${{ matrix.os.name }}
|
||||||
architecture: ${{ matrix.os.architecture }}
|
architecture: ${{ matrix.os.architecture }}
|
||||||
version: ${{ matrix.os.version }}
|
version: ${{ matrix.os.version }}
|
||||||
|
memory: 8G
|
||||||
|
cpu_count: 4
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sudo pkg install -y cmake
|
sudo pkg install -y cmake
|
||||||
cd external/src/curl
|
cd external/src/curl
|
||||||
cmake . -DCMAKE_C_FLAGS="-Os -flto" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DCURL_ZLIB=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF
|
cmake . -DCMAKE_C_FLAGS="-Os -flto" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DCURL_ZLIB=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF
|
||||||
make -j3
|
make -j4
|
||||||
cd lib && mkdir .libs && cp libcurl.a .libs
|
cd lib && mkdir .libs && cp libcurl.a .libs
|
||||||
cd ../../libuv
|
cd ../../libuv
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake .. -DCMAKE_C_FLAGS='-Os -flto' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
|
cmake .. -DCMAKE_C_FLAGS='-Os -flto' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
|
||||||
make -j3
|
make -j4
|
||||||
cd ../../libzmq
|
cd ../../libzmq
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake .. -DCMAKE_C_FLAGS='-Os -flto' -DCMAKE_CXX_FLAGS='-Os -flto' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
|
cmake .. -DCMAKE_C_FLAGS='-Os -flto' -DCMAKE_CXX_FLAGS='-Os -flto' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
|
||||||
make -j3
|
make -j4
|
||||||
cd ../../../..
|
cd ../../../..
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake .. -DCMAKE_C_FLAGS='-flto' -DCMAKE_CXX_FLAGS='-flto' -DSTATIC_LIBS=ON
|
cmake .. -DCMAKE_C_FLAGS='-flto' -DCMAKE_CXX_FLAGS='-flto' -DSTATIC_LIBS=ON
|
||||||
make -j3 p2pool
|
make -j4 p2pool
|
||||||
./p2pool --test
|
./p2pool --test
|
||||||
make -j3 randomx-tests
|
make -j4 randomx-tests
|
||||||
external/src/RandomX/randomx-tests
|
external/src/RandomX/randomx-tests
|
||||||
cd ../tests
|
cd ../tests
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake .. -DCMAKE_C_FLAGS='-flto' -DCMAKE_CXX_FLAGS='-flto' -DSTATIC_LIBS=ON
|
cmake .. -DCMAKE_C_FLAGS='-flto' -DCMAKE_CXX_FLAGS='-flto' -DSTATIC_LIBS=ON
|
||||||
make -j3
|
make -j4 p2pool_tests
|
||||||
gunzip *.gz
|
gunzip *.gz
|
||||||
./p2pool_tests
|
./p2pool_tests
|
||||||
|
|
||||||
|
@ -696,7 +698,7 @@ jobs:
|
||||||
- name: openbsd
|
- name: openbsd
|
||||||
architecture: x86-64
|
architecture: x86-64
|
||||||
version: '7.4'
|
version: '7.4'
|
||||||
host: macos-latest
|
host: macos-13
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
|
@ -715,16 +717,18 @@ jobs:
|
||||||
operating_system: ${{ matrix.os.name }}
|
operating_system: ${{ matrix.os.name }}
|
||||||
architecture: ${{ matrix.os.architecture }}
|
architecture: ${{ matrix.os.architecture }}
|
||||||
version: ${{ matrix.os.version }}
|
version: ${{ matrix.os.version }}
|
||||||
|
memory: 8G
|
||||||
|
cpu_count: 4
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sudo pkg_add -I cmake libuv zeromq curl
|
sudo pkg_add -I cmake libuv zeromq curl
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
cmake ..
|
cmake ..
|
||||||
make -j3 p2pool
|
make -j4 p2pool
|
||||||
cd ../tests
|
cd ../tests
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
cmake ..
|
cmake ..
|
||||||
make -j3 p2pool_tests
|
make -j4 p2pool_tests
|
||||||
gunzip *.gz
|
gunzip *.gz
|
||||||
./p2pool_tests
|
./p2pool_tests
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue