Skip to content

Build

Build #71

Workflow file for this run

name: Build
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag'
required: true
default: '2024.06.12'
build_windows:
type: boolean
description: 'Build Windows'
required: false
default: 'true'
build_linux:
type: boolean
description: 'Build Linux'
required: false
default: 'true'
build_mac:
type: boolean
description: 'Build Mac'
required: false
default: 'true'
build_docker:
type: boolean
description: 'Build Docker'
required: false
default: 'true'
jobs:
linux-build:
if: ${{ github.event.inputs.build_linux == 'true' }}
strategy:
matrix:
os: [ubuntu2404,ubuntu2204,ubuntu2004]
fail-fast: false
runs-on: ubuntu-20.04
steps:
- name: Download Build
run: |
git clone https://x-access-token:${{ secrets.DSISTUDIO_TOKEN }}@github.com/frankyeh/DSI-Studio-Build.git
mv DSI-Studio-Build/build_packages .
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Build and push
uses: docker/[email protected]
with:
context: .
build-args: |
DSISTUDIO_TOKEN=${{ secrets.DSISTUDIO_TOKEN }}
file: build_packages/${{ matrix.os }}/Dockerfile
push: false
outputs: dsi-studio
- name: Packaging
run: |
zip -r dsi_studio_${{ matrix.os }}.zip dsi-studio
- name: Create Release
env:
GH_TOKEN: ${{ secrets.DSISTUDIO_TOKEN }}
run: |
gh release upload ${{ github.event.inputs.tag }} *.zip --clobber --repo frankyeh/DSI-Studio
macos-build-qt6:
if: ${{ github.event.inputs.build_mac == 'true' }}
strategy:
matrix:
os: [macos-14,macos-13,macos-15]
fail-fast: false
runs-on: ${{ matrix.os }}
env:
CFLAGS: -Werror
steps:
- uses: actions/[email protected]
- name: Download Build
run: |
git clone https://x-access-token:${{ secrets.DSISTUDIO_TOKEN }}@github.com/frankyeh/DSI-Studio-Build.git
mv DSI-Studio-Build/*.txt .
mv DSI-Studio-Build/build_packages/build_mac.sh .
- name: brew update
run: |
brew update
brew install cmake
- name: Install Qt
uses: jurplel/[email protected]
with:
version: '6.5.2'
modules: qtcharts
- name: Build DSI Studio
run: |
sh build_mac.sh ${{ matrix.os }}
zip -r dsi_studio_${{ matrix.os }}_qt6.zip dsi_studio.app
- name: Create Release
env:
GH_TOKEN: ${{ secrets.DSISTUDIO_TOKEN }}
run: |
gh release upload ${{ github.event.inputs.tag }} *.zip --clobber
docker_build:
if: ${{ github.event.inputs.build_docker == 'true' }}
runs-on: ubuntu-20.04
steps:
- name: Download Build
run: |
git clone https://x-access-token:${{ secrets.DSISTUDIO_TOKEN }}@github.com/frankyeh/DSI-Studio-Build.git
mv DSI-Studio-Build/build_packages .
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Current Time
run: echo "DATE_TAG=$(date "+%Y-%m-%d")" >> $GITHUB_ENV
- name: Build and push
uses: docker/[email protected]
with:
context: .
build-args: |
DSISTUDIO_TOKEN=${{ secrets.DSISTUDIO_TOKEN }}
file: build_packages/docker/Dockerfile
push: true
tags: |
"dsistudio/dsistudio:hou-${{ env.DATE_TAG }}"
dsistudio/dsistudio:latest
windows_cpu_build:
if: ${{ github.event.inputs.build_windows == 'true' }}
runs-on: windows-2019
steps:
- uses: actions/[email protected]
- name: Download Build
run: |
git clone https://x-access-token:${{ secrets.DSISTUDIO_TOKEN }}@github.com/frankyeh/DSI-Studio-Build.git
move DSI-Studio-Build/*.txt .
move DSI-Studio-Build/build_packages .
- name: Install Qt
uses: jurplel/[email protected]
with:
version: 6.5.2
modules: addons.qtcharts
- name: Build
run: |
call .\build_packages\build_win.bat
move dsi_studio_win.zip dsi_studio_win_cpu.zip
shell: cmd
- name: Create Release
env:
GH_TOKEN: ${{ secrets.DSISTUDIO_TOKEN }}
run: |
gh release upload ${{ github.event.inputs.tag }} dsi_studio_win_cpu.zip --clobber
windows_gpu_build:
if: ${{ github.event.inputs.build_windows == 'true' }}
runs-on: windows-2019
steps:
- uses: actions/[email protected]
- name: Download Build
run: |
git clone https://x-access-token:${{ secrets.DSISTUDIO_TOKEN }}@github.com/frankyeh/DSI-Studio-Build.git
move DSI-Studio-Build/*.txt .
move DSI-Studio-Build/build_packages .
- name: Install Cuda
uses: Jimver/[email protected]
- name: Install Qt
uses: jurplel/[email protected]
with:
version: 6.5.2
modules: addons.qtcharts
- name: Build
run: |
call .\build_packages\build_win.bat
shell: cmd
- name: Create Release
env:
GH_TOKEN: ${{ secrets.DSISTUDIO_TOKEN }}
run: |
gh release upload ${{ github.event.inputs.tag }} dsi_studio_win.zip --clobber