Migrate over to gitea actions
All checks were successful
CI & Unit Tests / Unit-Tests (push) Successful in 1m13s

Co-authored-by: erki <skull132@skullnet.me>
Reviewed-on: #2
This commit is contained in:
erki 2023-05-15 20:55:21 +00:00
parent 927b950dec
commit 0698081d7b
4 changed files with 30 additions and 83 deletions

View File

@ -1,28 +0,0 @@
kind: pipeline
type: docker
name: default
steps:
- name: build and test
pull: never
image: erki/cpp-ubuntu:latest
commands:
- mkdir -p build
- cd build
- cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DWITH_TESTS=ON
- ninja
- ctest . --output-on-failure
- name: notify
image: plugins/matrix
settings:
homeserver:
from_secret: matrix_homeserver
roomid:
from_secret: matrix_roomid
username:
from_secret: matrix_username
password:
from_secret: matrix_password
when:
status:
- failure

30
.gitea/workflows/ci.yml Normal file
View File

@ -0,0 +1,30 @@
name: CI & Unit Tests
run-name: CI & Unit Tests
on: [push, pull_request]
jobs:
Unit-Tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Prepare environment
run: |
apt update
apt install -y --no-install-recommends build-essential cmake ninja-build
- name: Configure build
working-directory: ${{runner.workspace}}
run: |
cmake . -B${{runner.workspace}}/build \
-G"Ninja" \
-DCMAKE_BUILD_TYPE=Release \
-DSKULLC_WITH_TESTS=ON
- name: Build tests + lib
working-directory: ${{runner.workspace}}/build
run: ninja
- name: Run tests
working-directory: ${{runner.workspace}}/build
run: ctest . --output-on-failure

50
Jenkinsfile vendored
View File

@ -1,50 +0,0 @@
pipeline {
agent {
label 'ubuntu'
}
stages {
stage("build && test") {
steps {
echo "Workspace: ${env.WORKSPACE}"
sh 'mkdir -p build'
dir("build") {
sh 'ls'
sh 'cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DSKULLC_WITH_TESTS=ON'
sh 'ninja'
sh 'ctest . -T test --output-on-failure --no-compress-output'
}
}
}
}
post {
always {
archiveArtifacts (
artifacts: 'build/Testing/**/*.xml',
fingerprint: true
)
// Process the CTest xml output with the xUnit plugin
xunit (
testTimeMargin: '3000',
thresholdMode: 1,
thresholds: [
skipped(failureThreshold: '0'),
failed(failureThreshold: '0')
],
tools: [CTest(
pattern: 'build/Testing/**/*.xml',
deleteOutputFiles: true,
failIfNotNew: false,
skipNoTestFiles: true,
stopProcessingIfError: true
)]
)
// Clear the source and build dirs before next run
deleteDir()
}
}
}

View File

@ -1,5 +0,0 @@
[requires]
catch2/[>=2.0.0,<3.0.0]
[generators]
cmake_find_package