Skip to content

Commit f5dc30c

Browse files
committed
wip:ci
1 parent cb13564 commit f5dc30c

File tree

6 files changed

+67
-14
lines changed

6 files changed

+67
-14
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
on:
2+
workflow_dispatch:
3+
push:
4+
paths:
5+
- "ci/docker/ubuntu/**"
6+
7+
env:
8+
REGISTRY: ghcr.io
9+
IMAGE_NAME: ${{ github.repository }}/ubuntu
10+
11+
jobs:
12+
build-ubuntu-docker:
13+
permissions:
14+
contents: read
15+
packages: write
16+
# This is used to complete the identity challenge
17+
# with sigstore/fulcio when running outside of PRs.
18+
id-token: write
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v3
23+
- name: Log into registry ${{ env.REGISTRY }}
24+
if: github.event_name != 'pull_request'
25+
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
26+
with:
27+
registry: ${{ env.REGISTRY }}
28+
username: ${{ github.actor }}
29+
password: ${{ secrets.GITHUB_TOKEN }}
30+
- name: Extract Docker metadata
31+
id: meta
32+
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
33+
with:
34+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
35+
- name: Build and push Docker image
36+
uses: docker/build-push-action@v4
37+
with:
38+
context: ci/docker/ubuntu/
39+
file: ci/docker/ubuntu/Dockerfile
40+
push: true
41+
tags: ${{ steps.meta.outputs.tags }}
42+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/sonarcloud.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,20 @@ on:
44
branches:
55
- "**"
66

7+
env:
8+
REGISTRY: ghcr.io
9+
IMAGE_NAME: ${{ github.repository }}/ubuntu:fix-ci
10+
711
jobs:
812
static_analysis:
913
runs-on: ubuntu-latest
14+
container:
15+
image: ghcr.io/${{ github.repository }}/ubuntu:fix-ci
1016
steps:
1117
- name: Checkout
1218
uses: actions/checkout@v2
1319
with:
1420
submodules: true
15-
- name: Install package
16-
run: |
17-
sudo apt-get update
18-
sudo apt-get -y install qtbase5-dev qt3d5-dev libqt5svg5-dev freeglut3-dev libabsl-dev libprotobuf-dev libre2-dev libeigen3-dev lcov
19-
- name: Install build wrapper
20-
run: |
21-
wget http://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip
22-
unzip build-wrapper-linux-x86.zip
23-
- name: Install sonar scanner
24-
run: |
25-
wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.6.2.2472-linux.zip
26-
unzip sonar-scanner-cli-4.6.2.2472-linux.zip
2721
- name: Build and scan
2822
run: ci/buildsonarcloud.sh
2923
env:

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ set(TEMPLATE_DIR ${PROJECT_SOURCE_DIR}/template)
4343
find_package(codecov)
4444

4545
find_package(PythonInterp REQUIRED)
46+
find_package(ortools CONFIG REQUIRED)
4647

4748
find_package(Qt5 COMPONENTS REQUIRED
4849
Core

ci/docker/ubuntu/Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM ubuntu:noble
2+
3+
RUN apt update && apt install -y qtbase5-dev qt3d5-dev libqt5svg5-dev \
4+
freeglut3-dev lcov \
5+
build-essential cmake
6+
7+
RUN apt update && apt install -y wget unzip git python3-jinja2
8+
9+
RUN wget http://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip
10+
RUN unzip build-wrapper-linux-x86.zip
11+
12+
RUN wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.6.2.2472-linux.zip
13+
RUN unzip sonar-scanner-cli-4.6.2.2472-linux.zip
14+
15+
RUN wget https://github.com/google/or-tools/releases/download/v9.10/or-tools_amd64_ubuntu-24.04_cpp_v9.10.4067.tar.gz
16+
RUN tar -C /opt --strip-components=1 -xvf or-tools_amd64_ubuntu-24.04_cpp_v9.10.4067.tar.gz
17+
18+
RUN git config --global --add safe.directory '*'

thirdparty/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ add_subdirectory(fmt)
44
add_subdirectory(libdxfrw)
55
add_subdirectory(nanoflann)
66
add_subdirectory(yaml-cpp)
7-
add_subdirectory(or-tools)

thirdparty/or-tools

Submodule or-tools deleted from ed8db90

0 commit comments

Comments
 (0)