Skip to content

Commit

Permalink
Fix initial CI setup
Browse files Browse the repository at this point in the history
Signed-off-by: Simo Sorce <simo@redhat.com>

Signed-off-by: Simo Sorce <simo@redhat.com>
  • Loading branch information
simo5 committed Feb 27, 2024
1 parent 8999957 commit 9124996
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,27 @@ jobs:
steps:
- name: Install Dependencies
run: |
dnf -y install git cargo gcc
dnf -y install git cargo clang-devel openssl-devel \
'perl(FindBin)' 'perl(lib)' 'perl(File::Compare)' \
'perl(File::Copy)' 'perl(bigint)' 'perl(Time::HiRes)' \
'perl(IPC::Cmd)' 'perl(Pod::Html)' 'perl(Digest::SHA)' \
'perl(Module::Load::Conditional)' 'perl(File::Temp)' \
'perl(Test::Harness)' 'perl(Test::More)' 'perl(Math::BigInt)' \
zlib-devel sed
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup
run: |
git config --global --add safe.directory /__w/kryoptic/kryoptic
git submodule init
git submodule update
- name: Build
run: |
if [ "${{ matrix.name }}" = "fips" ]; then
cargo build --features fips
cargo build -vv --features fips
fi
if [ "${{ matrix.name }}" = "ossl3" ]; then
cargo build
cargo build -vv
fi
- name: Test
run: |
Expand All @@ -40,3 +47,10 @@ jobs:
if [ "${{ matrix.name }}" = "ossl3" ]; then
cargo test
fi
- uses: actions/upload-artifact@v3
if: failure()
with:
name: Build logs ${{ matrix.name }}
path: |
target/debug/build/*/output
8 changes: 4 additions & 4 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ jobs:
- name: Setup
if: ${{ github.event.pull_request.base.sha }}
run: |
git config --global --add safe.directory \
/__w/kryoptic/kryoptic
git config --global --add safe.directory /__w/kryoptic/kryoptic
git fetch origin main ${{ github.event.pull_request.base.sha }}
- name: Run rustfmt
run: |
rustfmt src/*.rs src/*/*.rs
@lines=`git diff -U0 --no-color |wc -l`; \
if [ "$$lines" != "0" ]; then \
git diff -U0 --no-color
LINES=`git diff -U0 --no-color |wc -l`; \
if [ "$LINES" != "0" ]; then \
echo "Rustfmt issues detected"; \
exit 1; \
else \
Expand Down

0 comments on commit 9124996

Please sign in to comment.