-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement CI #3
Implement CI #3
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Build and Test on Linux Platforms | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
build-and-test: | ||
name: "Build and test Linux" | ||
runs-on: [self-hosted, Linux, X64, aws_autoscaling] | ||
steps: | ||
# https://github.com/actions/checkout/issues/1552 | ||
- name: Clean up after previous checkout | ||
run: chmod +w -R ${GITHUB_WORKSPACE}; rm -rf ${GITHUB_WORKSPACE}/*; | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Run checks | ||
run: nix build -L .?#checks.x86_64-linux.all-gcc | ||
env: | ||
NIX_CONFIG: | | ||
cores = 4 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: PR Testing | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
concurrency: | ||
# In master we want to run for every commit, in other branches — only for the last one | ||
group: ${{ | ||
( github.ref == 'refs/heads/master' && format('{0}/{1}/{2}', github.workflow, github.ref, github.sha) ) | ||
|| | ||
format('{0}/{1}', github.workflow, github.ref) }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test-linux: | ||
name: Linux Crypto3 Testing | ||
uses: ./.github/workflows/linux-nix-check.yml | ||
if: | | ||
always() && !cancelled() | ||
secrets: inherit | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,13 +3,11 @@ | |
ninja, | ||
pkg-config, | ||
cmake, | ||
boost183, | ||
# We'll use boost183 by default, but you can override it | ||
boost_lib ? boost183, | ||
boost, | ||
gdb, | ||
cmake_modules, | ||
enableDebugging, | ||
enableDebug ? true, | ||
enableDebug ? false, | ||
runTests ? false, | ||
}: | ||
let | ||
|
@@ -22,7 +20,7 @@ in stdenv.mkDerivation { | |
nativeBuildInputs = [ cmake ninja pkg-config ] ++ (lib.optional (!stdenv.isDarwin) gdb); | ||
|
||
# enableDebugging will keep debug symbols in boost | ||
propagatedBuildInputs = [ (if enableDebug then (enableDebugging boost_lib) else boost_lib) ]; | ||
propagatedBuildInputs = [ (if enableDebug then (enableDebugging boost) else boost) ]; | ||
|
||
buildInputs = [cmake_modules]; | ||
|
||
|
@@ -33,6 +31,7 @@ in stdenv.mkDerivation { | |
(if enableDebug then "-DCMAKE_BUILD_TYPE=Debug" else "-DCMAKE_BUILD_TYPE=Release") | ||
(if enableDebug then "-DCMAKE_CXX_FLAGS=-ggdb" else "") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's keep CXX flags in CMake (like in zkEVMFramework) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
(if enableDebug then "-DCMAKE_CXX_FLAGS=-O0" else "") | ||
"-G Ninja" | ||
]; | ||
|
||
doCheck = runTests; # tests are inside crypto3-tests derivation | ||
|
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ | |
|
||
#include <iostream> | ||
#include <fstream> | ||
#include <cstdint> | ||
|
||
#include <boost/test/unit_test.hpp> | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why only build without check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two chains to build now - gcc and clang.
It would take too long to build all. I would prefer to start 2 different jobs, so the CI will run faster