Ver código fonte

Integrate github CI

- Add docker-based ubuntu-latest build
Alexey Edelev 5 anos atrás
pai
commit
9bf12d8700

+ 31 - 0
.ci/Dockerfile.ubuntu

@@ -0,0 +1,31 @@
+FROM ubuntu:19.04
+RUN apt-get -qq update
+RUN apt-get -qq install -y libgrpc++-dev \
+    protobuf-compiler-grpc libgrpc++1 \
+    libgrpc-dev \
+    libgrpc6 \
+    build-essential \
+    cmake \
+    golang \
+    wget \
+    libdbus-1-3 \
+    libfreetype6 libfontconfig libx11-6 \
+    libgl1-mesa-dev \
+    libsm6 \
+    libice6 \
+    libxext6 \
+    libxrender1 \
+    doxygen \
+    libgtest-dev
+RUN wget --quiet https://download.qt.io/official_releases/qt/5.13/5.13.2/qt-opensource-linux-x64-5.13.2.run -P /
+RUN chmod +x /qt-opensource-linux-x64-5.13.2.run
+COPY .ci/qt_installer.qs /qt_installer.qs
+RUN /qt-opensource-linux-x64-5.13.2.run -platform minimal --script /qt_installer.qs
+ADD . /sources
+RUN mkdir -p /build
+WORKDIR /build
+ENV PATH=/qt/5.13.2/gcc_64/bin:$PATH
+RUN cmake ../sources -DCMAKE_PREFIX_PATH="/qt/5.13.2/gcc_64/lib/cmake"
+RUN cmake --build . --config RELEASE
+ENV QT_PLUGIN_PATH=/qt/5.13.2/gcc_64/plugins
+ENV QT_QPA_PLATFORM=minimal

+ 26 - 0
.ci/Dockerfile.windows

@@ -0,0 +1,26 @@
+# escape=`
+
+# Use the latest Windows Server Core image with .NET Framework 4.8.
+FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019
+
+# Restore the default Windows shell for correct batch processing.
+SHELL ["cmd", "/S", "/C"]
+
+# Download the Build Tools bootstrapper.
+ADD https://aka.ms/vs/15/release/vs_buildtools.exe C:\TEMP\vs_buildtools.exe
+
+# Install Build Tools excluding workloads and components with known issues.
+RUN C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache `
+    --installPath C:\BuildTools `
+    --all `
+    --remove Microsoft.VisualStudio.Component.Windows10SDK.10240 `
+    --remove Microsoft.VisualStudio.Component.Windows10SDK.10586 `
+    --remove Microsoft.VisualStudio.Component.Windows10SDK.14393 `
+    --remove Microsoft.VisualStudio.Component.Windows81SDK `
+ || IF "%ERRORLEVEL%"=="3010" EXIT 0
+
+# Start developer command prompt with any other commands specified.
+ENTRYPOINT C:\BuildTools\Common7\Tools\VsDevCmd.bat &&
+
+# Default to PowerShell if no other command specified.
+CMD ["powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]

Diferenças do arquivo suprimidas por serem muito extensas
+ 37 - 0
.ci/Install.cmd


+ 54 - 0
.ci/qt_installer.qs

@@ -0,0 +1,54 @@
+function Controller() {
+    installer.autoRejectMessageBoxes();
+    installer.installationFinished.connect(function() {
+        gui.clickButton(buttons.NextButton);
+    })
+}
+
+Controller.prototype.WelcomePageCallback = function() {
+    gui.clickButton(buttons.NextButton, 3000);
+}
+
+Controller.prototype.CredentialsPageCallback = function() {
+    gui.clickButton(buttons.NextButton);
+}
+
+Controller.prototype.IntroductionPageCallback = function() {
+    gui.clickButton(buttons.NextButton);
+}
+
+Controller.prototype.TargetDirectoryPageCallback = function()
+{
+    gui.currentPageWidget().TargetDirectoryLineEdit.setText("/qt");
+    gui.clickButton(buttons.NextButton);
+}
+
+Controller.prototype.ComponentSelectionPageCallback = function() {
+    var widget = gui.currentPageWidget();
+    widget.deselectAll();
+    widget.selectComponent("qt.qt5.5132.gcc_64");
+
+    gui.clickButton(buttons.NextButton);
+}
+
+Controller.prototype.LicenseAgreementPageCallback = function() {
+    gui.currentPageWidget().AcceptLicenseRadioButton.setChecked(true);
+    gui.clickButton(buttons.NextButton);
+}
+
+Controller.prototype.StartMenuDirectoryPageCallback = function() {
+    gui.clickButton(buttons.NextButton);
+}
+
+Controller.prototype.ReadyForInstallationPageCallback = function()
+{
+    gui.clickButton(buttons.NextButton);
+}
+
+Controller.prototype.FinishedPageCallback = function() {
+var checkBoxForm = gui.currentPageWidget().LaunchQtCreatorCheckBoxForm
+if (checkBoxForm && checkBoxForm.launchQtCreatorCheckBox) {
+    checkBoxForm.launchQtCreatorCheckBox.checked = false;
+}
+    gui.clickButton(buttons.FinishButton);
+} 

+ 27 - 0
.github/workflows/dockerimage.yml

@@ -0,0 +1,27 @@
+name: Test Verification
+
+on: [push]
+
+jobs:
+
+  build:
+
+    runs-on: ubuntu-latest
+
+    steps:
+    - uses: actions/checkout@v1
+    - name: Init submodules
+      run: git submodule update --init --recursive
+    - name: Build the Docker image
+      run: docker build . --file .ci/Dockerfile.ubuntu --tag ubuntu_debugimage:latest
+    - name: Run tests
+      run: docker run ubuntu_debugimage:latest ctest /build --output-on-failure
+  #build-windows:
+    #runs-on: windows-latest
+
+    #steps:
+    #- uses: actions/checkout@v1
+    #- name: Init submodules
+      #run: git submodule update --init --recursive
+    #- name: Build the Docker image
+      #run: docker build . --file .ci/Dockerfile.windows --isolation=hyperv --tag windows_debugimage:latest -m 2GB

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff