Gitea actions #2
28
.drone.yml
28
.drone.yml
@ -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
30
.gitea/workflows/ci.yml
Normal 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
50
Jenkinsfile
vendored
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,5 +0,0 @@
|
||||
[requires]
|
||||
catch2/[>=2.0.0,<3.0.0]
|
||||
|
||||
[generators]
|
||||
cmake_find_package
|
||||
Loading…
x
Reference in New Issue
Block a user