-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into clean_linker
- Loading branch information
Showing
3 changed files
with
136 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Mirror GitLab Repository | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
mirror: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Push to GitLab | ||
run: | | ||
git remote add gitlab [email protected]:ug4-project/ugcore.git | ||
git push --mirror gitlab | ||
env: | ||
SSH_PRIVATE_KEY: ${{ secrets.GITLAB_SSH_PRIVATE_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
# You can override the included template(s) by including variable overrides | ||
# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings | ||
# Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/pipeline/#customization | ||
# Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings | ||
# Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings | ||
# Note that environment variables can be set in several places | ||
# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence | ||
default: | ||
tags: | ||
- docker | ||
- linux | ||
variables: | ||
GIT_CLONE_PATH: "$CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ug4/ugcore" | ||
stages: | ||
- test | ||
- build | ||
- sync | ||
|
||
do-test: | ||
stage: test | ||
image: rigby132/ug4-test:latest | ||
timeout: 4 hours | ||
variables: | ||
CMAKE_C_COMPILER: gcc | ||
CMAKE_CXX_COMPILER: g++ | ||
script: | ||
- cd .. | ||
- cp --update=none -R /opt/ug4/. . | ||
- mkdir -p build | ||
- cd build | ||
- cmake .. -DENABLE_ALL_PLUGINS=ON -DDEBUG=ON -GNinja | ||
- ninja -j8 | ||
- cd .. | ||
- cd apps/unit_tests/ | ||
- mkdir -p build | ||
- cd build | ||
- cmake .. -DUSE_JSON=OFF -DINTERNAL_BOOST=ON -DDEBUG=ON -GNinja | ||
- ninja -j8 | ||
- cd ../../.. | ||
- pwd | ||
- ls -a | ||
- source ugcore/scripts/shell/ugbash | ||
- echo $UG4_ROOT | ||
- "./bin/testsuite --build-info=yes --log_level=all --log_format=JUNIT --log_sink=report.xml -- --name report" | ||
- cat ug_test_numprocs_1.log | ||
- mv ug_test_numprocs_1.log ugcore/test.log | ||
- cat report.xml | ||
- mv report.xml ugcore/report.xml | ||
artifacts: | ||
when: always | ||
expire_in: 1 week | ||
paths: | ||
- report.xml | ||
- test.log | ||
reports: | ||
junit: report.xml | ||
|
||
build-clang: | ||
stage: build | ||
image: rigby132/ug4-minimal:latest | ||
timeout: 4 hours | ||
variables: | ||
CMAKE_C_COMPILER: gcc | ||
CMAKE_CXX_COMPILER: g++ | ||
CXX_FLAGS: "-O3 -fPIC" | ||
before_script: | ||
- docker info | ||
- echo "$CI_REGISTRY" | ||
- echo "$CI_JOB_TOKEN" | docker login $CI_REGISTRY -u $CI_REGISTRY_USER --password-stdin | ||
script: | ||
- cd .. | ||
- cp --update=none -R /opt/ug4/. . | ||
- mkdir -p build | ||
- cd build | ||
- cmake .. -DENABLE_ALL_PLUGINS=ON -DDEBUG=OFF -GNinja | ||
- ninja -j8 | ||
- cd .. | ||
- cd .. | ||
- echo -e 'FROM ubuntu:latest\nENV DEBIAN_FRONTEND=noninteractive\nRUN apt-get update | ||
&& apt-get install -y python3 \nADD ug4 /opt/ug4' > Dockerfile | ||
- docker build -t registry.gitlab.com/ug4-project/ugcore . | ||
- docker push registry.gitlab.com/ug4-project/ugcore | ||
- cd ug4 | ||
- ls -a bin | ||
- mv bin ugcore/bin | ||
artifacts: | ||
when: on_success | ||
expire_in: 1 week | ||
paths: | ||
- bin/* | ||
- bin/plugins/* | ||
|
||
include: | ||
- template: Jobs/SAST.gitlab-ci.yml | ||
- template: Security/SAST.gitlab-ci.yml | ||
- local: '/.gitlab/mirror-main.yml' | ||
|
||
sast: | ||
stage: test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
stages: | ||
- sync | ||
|
||
sync_to_github: | ||
stage: sync | ||
image: alpine:latest | ||
before_script: | ||
- apk add --no-cache git | ||
- git config --global user.name "UG4_BOT" | ||
- git config --global user.email "[email protected]" | ||
script: | ||
- git clone --mirror https://oauth2:${CI_JOB_TOKEN}@gitlab.com/ug4-project/ugcore.git repo | ||
- cd repo | ||
- git remote add github https://${GITHUB_UG4BOT_NAME}:${GITHUB_UG4BOT_TOKEN}@github.com/UG4/ugcore.git | ||
- git push --mirror github | ||
only: | ||
- main # Trigger on pushes to the main branch only |