diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..aa0ce99f68 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,9 @@ +.github +scripts +.clang-format +.git +.gitattributes +.gitignore +.travis.yml +build.sh +compile_commands.json diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 8b11e3ddf6..8630d5efdd 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -17,23 +17,19 @@ jobs: fetch-depth: 0 - name: Install Qt - uses: jurplel/install-qt-action@v3 + uses: jurplel/install-qt-action@v4 env: ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' with: version: 5.15.2 target: desktop host: mac - setup-python: 'false' + setup-python: 'true' install-deps: true - name: Print out Qt directory run: echo $Qt5_DIR; echo $Qt5_Dir - - name: Prepare - run: | - ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11/ /usr/local/include/X11 - - name: make run: ./build.sh -DQt_PATH="${Qt5_Dir}" @@ -47,7 +43,7 @@ jobs: ./repair_package.sh - name: Upload installer - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: SCIRunMacInstaller path: bin/SCIRun/SCIRun-5.0.beta.*-Darwin.pkg @@ -75,20 +71,16 @@ jobs: fetch-depth: 0 - name: Install Qt - uses: jurplel/install-qt-action@v3 + uses: jurplel/install-qt-action@v4 env: ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' with: version: 5.15.2 target: desktop host: mac - setup-python: 'false' + setup-python: 'true' install-deps: true - - name: Prepare - run: | - ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11/ /usr/local/include/X11 - - name: make run: ./build.sh -DBUILD_WITH_PYTHON=OFF -DQt_PATH="${Qt5_Dir}" @@ -102,7 +94,7 @@ jobs: ./repair_package.sh - name: Upload installer - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: SCIRunMacNPInstaller path: bin/SCIRun/SCIRun-5.0.beta.*-Darwin.pkg @@ -118,23 +110,19 @@ jobs: fetch-depth: 0 - name: Install Qt - uses: jurplel/install-qt-action@v3 + uses: jurplel/install-qt-action@v4 env: ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' with: version: 5.15.2 target: desktop host: mac - setup-python: 'false' + setup-python: 'true' install-deps: true - name: Print out Qt directory run: echo $Qt5_DIR; echo $Qt5_Dir - - name: Prepare - run: | - ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11/ /usr/local/include/X11 - - name: make run: ./build.sh -DWITH_OSPRAY:BOOL=ON -DQt_PATH="${Qt5_Dir}" @@ -148,7 +136,7 @@ jobs: ./repair_package.sh - name: Upload installer - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: SCIRunMacOsprayInstaller path: bin/SCIRun/SCIRun-5.0.beta.*-Darwin.pkg @@ -173,10 +161,6 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Prepare - run: | - ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11/ /usr/local/include/X11 - - name: Compile run: ./build.sh -DBUILD_HEADLESS:BOOL=ON -DBUILD_TESTING:BOOL=ON diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index ae20c6175d..c67ad7f4d4 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -45,7 +45,7 @@ jobs: fetch-depth: 0 - name: Install Qt - uses: jurplel/install-qt-action@v3 + uses: jurplel/install-qt-action@v4 env: ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' with: @@ -53,7 +53,7 @@ jobs: target: desktop host: windows arch: win64_msvc2019_64 - setup-python: 'false' + setup-python: 'true' install-deps: true - name: Print out Qt directory @@ -76,7 +76,7 @@ jobs: run: cmake --build . --config Release --target package - name: Upload installer - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 continue-on-error: true with: name: SCIRunWindowsInstaller_qt5 @@ -93,7 +93,7 @@ jobs: fetch-depth: 0 - name: Install Qt - uses: jurplel/install-qt-action@v3 + uses: jurplel/install-qt-action@v4 env: ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' with: @@ -101,7 +101,7 @@ jobs: target: desktop host: windows arch: win64_msvc2019_64 - setup-python: 'false' + setup-python: 'true' install-deps: true - name: Print out Qt directory @@ -110,7 +110,7 @@ jobs: - name: Configure working-directory: bin run: | - cmake ..\Superbuild -DCMAKE_BUILD_TYPE=Release -G"Visual Studio 16 2019" -Ax64 -DSCIRUN_QT_MIN_VERSION:STRING="6.3.1" -DQt_PATH:PATH="$env:Qt6_Dir" -DBUILD_WITH_PYTHON:BOOL=OFF + cmake ..\Superbuild -DCMAKE_BUILD_TYPE=Release -G"Visual Studio 16 2019" -Ax64 -DSCIRUN_QT_MIN_VERSION:STRING="6.3.1" -DQt_PATH:PATH="$env:QT_ROOT_DIR" -DBUILD_WITH_PYTHON:BOOL=OFF - name: Compile working-directory: bin @@ -124,7 +124,7 @@ jobs: run: cmake --build . --config Release --target package - name: Upload installer - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 continue-on-error: true with: name: SCIRunWindowsInstaller_qt6 @@ -141,7 +141,7 @@ jobs: fetch-depth: 0 - name: Install Qt - uses: jurplel/install-qt-action@v3 + uses: jurplel/install-qt-action@v4 env: ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' with: @@ -149,7 +149,7 @@ jobs: target: desktop host: windows arch: win64_msvc2019_64 - setup-python: 'false' + setup-python: 'true' install-deps: true - name: Configure @@ -169,7 +169,7 @@ jobs: run: cmake --build . --config Release --target package - name: Upload installer - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 continue-on-error: true with: name: SCIRunWindowsPythonInstaller @@ -197,7 +197,7 @@ jobs: fetch-depth: 0 - name: Install Qt - uses: jurplel/install-qt-action@v3 + uses: jurplel/install-qt-action@v4 env: ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' with: @@ -205,7 +205,7 @@ jobs: target: desktop host: windows arch: win64_msvc2019_64 - setup-python: 'false' + setup-python: 'true' install-deps: true - name: Configure @@ -225,7 +225,7 @@ jobs: run: cmake --build . --config Release --target package - name: Upload installer - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 continue-on-error: true with: name: SCIRunWindowsOsprayInstaller diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..0b5ac982ff --- /dev/null +++ b/Dockerfile @@ -0,0 +1,36 @@ +#syntax=docker/dockerfile:1-labs +FROM ubuntu:24.04 + +ARG SCIRUN_VERSION="v5.0-beta.2023" + +RUN apt-get -y update \ + && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install qtbase5-dev libqt5svg5-dev \ + cmake git openssl tzdata build-essential g++ zlib1g-dev libssl-dev libncurses-dev libsqlite3-dev \ + libreadline-dev libtk-img-dev libgdm-dev libdb-dev libpcap-dev \ + && rm -rf /var/cache/apt/archives /var/lib/apt/lists/* + +WORKDIR /scirun-src +COPY . /scirun-src/ + +WORKDIR /opt/scirun +# TODO: Separate external building from SCIRun +RUN cmake -DQt_PATH=/usr/lib/x86_64-linux-gnu/cmake \ + -DCMAKE_BUILD_TYPE=Release /scirun-src/Superbuild && make + +# Make the internal python usable externally +ENV LD_LIBRARY_PATH=/opt/scirun/Externals/Install/Python_external/lib:$LD_LIBRARY_PATH +ENV PATH=/opt/scirun/SCIRun:/opt/scirun/Externals/Install/Python_external/bin:$PATH +RUN python3 -m ensurepip && python3 -m pip install --no-cache-dir --upgrade pip && python3 -m venv /opt/venv + +WORKDIR /opt/scripts +COPY <disableGui() || Application::Instance().parameters()->help()) + { + return ConsoleApplication::run(argc, argv); + } + return GuiApplication::run(argc, argv); + #else return ConsoleApplication::run(argc, argv); #endif