Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add runtime test action #65

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
1131799
Add linux runtime test action
romanodanilo May 30, 2024
9385f04
Fix runtime test linux
romanodanilo May 30, 2024
d9f5597
Add push to linux runtime action
romanodanilo May 30, 2024
6406d8b
Add github worfklows to paths in action
romanodanilo May 30, 2024
175c656
Fix github worfklows to paths in action
romanodanilo May 30, 2024
99058dc
Add first dockerfile windows action
romanodanilo May 30, 2024
f4bf053
Fix windows dockerfile name
romanodanilo May 30, 2024
2f73d34
Add setup steps to windows docker
romanodanilo May 30, 2024
c56d084
Add necessary tools install windows docker
romanodanilo May 30, 2024
caa5f41
Add msbuild and qt to windows docker
romanodanilo May 30, 2024
8b84691
Fix required tools windows docker
romanodanilo May 30, 2024
aff0bbe
Test choco setup windows docker
romanodanilo May 30, 2024
58904c9
Test init setup docker windows
romanodanilo May 30, 2024
c3db3f4
Restore simple docker on win 2019
romanodanilo May 30, 2024
7583c0f
Test msbuild docker windows
romanodanilo May 30, 2024
8d6fc9e
Test new command windows docker
romanodanilo May 30, 2024
417a0e9
Add gtest to windows docker
romanodanilo May 30, 2024
2298ed2
Add cmake install windows docker
romanodanilo May 30, 2024
50ee2c2
Add cmake envs to windows docker
romanodanilo May 30, 2024
486a915
Add test cmake install windows docker
romanodanilo May 31, 2024
a79fd84
Add ms build docker windows
romanodanilo May 31, 2024
38500fd
Add dev cmd docker windows
romanodanilo May 31, 2024
9e5ec9e
Test .net base docker in windows docker
romanodanilo May 31, 2024
57c746c
Fix target name in windows docker
romanodanilo May 31, 2024
6e040bf
Fix path inclusion windows docker
romanodanilo May 31, 2024
f7978d5
Remove cmake path install to windows docker
romanodanilo May 31, 2024
d149dd8
Add cmake and qt install to windows docker
romanodanilo Jun 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/runtime-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Runtime test
on:
pull_request:
branches:
- develop
- main
paths: # we only include paths critical for building to avoid unnecessary runs
- src/**
- include/**
- scripts/cmake/**
- tests/**
- .github/workflows/**

# execute on every push made targeting the branches bellow
push:
branches:
- master
- develop # can be removed on master merge
paths: # we only include paths critical for building to avoid unnecessary runs
- src/**
- include/**
- scripts/cmake/**
- .github/workflows/**
jobs:
build-containers:
name: Build Containers
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 2
matrix:
os: [ubuntu-22.04, windows-2019]
include:
- os: ubuntu-22.04
base: ubuntu-22.04
file: docker/Dockerfile.linux
- os: windows-2019
base: windows-2019
file: docker/Dockerfile.windows

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Docker Build
run: |
docker build -f ${{ matrix.file }} --target runtime_test -t runtime_test-${{ matrix.os }} .
- name: Test execution
run: |
docker run --rm --name runtime_test-${{ matrix.os }} runtime_test-${{ matrix.os }}

File renamed without changes.
34 changes: 34 additions & 0 deletions docker/Dockerfile.windows
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8 as runtime_test

# Set the environment variables for the paths
ENV CMAKE_VERSION=3.29.3
ENV CMAKE_INSTALL_DIR="C:\\CMake"

SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;"]

# Download and install CMake
RUN Invoke-WebRequest -Uri "https://github.com/Kitware/CMake/releases/download/v${env:CMAKE_VERSION}/cmake-${env:CMAKE_VERSION}-windows-x86_64.zip" -OutFile "cmake.zip"; Expand-Archive -Path "cmake.zip" -DestinationPath $env:CMAKE_INSTALL_DIR; Remove-Item -Force cmake.zip


# Add CMake to PATH
RUN setx /M PATH $($Env:PATH + ';C:\CMake\cmake-3.29.3-windows-x86_64\bin')

ENV QT_VERSION=5.15.2 \
QT_INSTALL_DIR="C:\\Qt"

# Install Chocolatey and Qt
RUN Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor [System.Net.SecurityProtocolType]::Tls12;iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')); choco install -y qt5-default --version=5.15.2

ENV GTEST_INSTALL_DIR="C:\\gtest-Out"

# Download and install git
RUN choco install -y git

# Verify installation
RUN cmake --version

# Set the working directory
WORKDIR /app

# Set entrypoint
ENTRYPOINT ["cmd"]
2 changes: 1 addition & 1 deletion docker/test_runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cd ..

DOCKER_BUILDKIT=1 \
docker build \
-f docker/Dockerfile \
-f docker/Dockerfile.linux \
--target runtime_test \
-t runtime_test .

Expand Down
Loading