Skip to content

Commit

Permalink
workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelscholle committed Dec 12, 2023
1 parent 6160fc0 commit 32216a6
Show file tree
Hide file tree
Showing 5 changed files with 318 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/Windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: OpenHD Image Writer Windows

on:
push:
branches:
- "2.5-evo"
- "dev-release"
- "release"
paths-ignore:
- '**.md'
- '**.asciidoc'
- '**.adoc'
- '.gitignore'
- 'LICENSE'

env:
BUILD_TYPE: Release

jobs:
build:
runs-on: windows-latest

defaults:
run:
working-directory: src

steps:
- uses: actions/checkout@v3

- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
aqtversion: '==3.1.*'
version: '5.15.2'
host: 'windows'
target: 'desktop'
arch: 'win32_mingw81'

- name: Install dependencies
run: |
choco install -y nsis openssl.light
mkdir C:\files
xcopy "C:\Program Files\OpenSSL" C:\files /E /I /Q
dir "C:\files"
- name: Configure CMake
run: |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -G "Unix Makefiles" -DOPENSSL_ROOT_DIR="C:\files" -DCMAKE_TOOLCHAIN_FILE="C:\Qt\${{env.QT_VERSION}}\${{env.QT_VERSION}}\mingw32\isystem.cmake"
- name: Build
run: |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
cd ../build/
dir
makensis openhdimagewriter.nsi
- name: Upload to Github
uses: 'actions/upload-artifact@v3'
with:
name: "OpenHD Image Writer"
path: |
*.exe
if-no-files-found: error
58 changes: 58 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build MacOS

on:
push:
branches:
- "2.5-evo"
- "dev-release"
- "release"
paths-ignore:
- '**.md'
- '**.asciidoc'
- '**.adoc'
- '.gitignore'
- 'LICENSE'

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

jobs:
build:
runs-on: macos-latest

defaults:
run:
working-directory: src

steps:
- uses: actions/checkout@v3

- name: Install Qt
uses: jurplel/install-qt-action@v3

- name: Install create-dmg
run: brew install create-dmg


- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
# Build your program with the given configuration
run: |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
cd ../build/
ls -a
create-dmg OpenHDImageWriter.dmg OpenHDImageWriter.app
- name: Upload to Github
uses: 'actions/upload-artifact@v3'
with:
name: "OpenHD Image Writer"
path: |
/Users/runner/work/OpenHD-ImageWriter/OpenHD-ImageWriter/build/OpenHDImageWriter.dmg
if-no-files-found: error
62 changes: 62 additions & 0 deletions .github/workflows/ubuntu20.04.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# This is a basic workflow to help you get started with Actions

name: OpenHD Image Writer

# Controls when the workflow will run
on:
push:
branches:
- "2.5-evo"
- "dev-release"
- "release"
paths-ignore:
- '**.md'
- '**.asciidoc'
- '**.adoc'
- '.gitignore'
- 'LICENSE'

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-20.04

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Runs a set of commands using the runners shell
- name: Build
run: |
sudo apt update
sudo apt upgrade
sudo apt install -y --no-install-recommends libgnutls28-dev build-essential devscripts debhelper cmake git libarchive-dev libcurl4-openssl-dev qtbase5-dev qtbase5-dev-tools qtdeclarative5-dev libqt5svg5-dev qttools5-dev libssl-dev qml-module-qtquick2 qml-module-qtquick-controls2 qml-module-qtquick-layouts qml-module-qtquick-templates2 qml-module-qtquick-window2 qml-module-qtgraphicaleffects
mkdir build
mv `ls -A | grep -v "build"` build
cd build
debuild -uc -us
cd ..
- name: Upload to Github
uses: 'actions/upload-artifact@v2'
with:
name: "OpenHD Image Writer"
path: |
*.deb
if-no-files-found: error

# - name: Push
# id: push
# uses: cloudsmith-io/action@master
# with:
# api-key: ${{ secrets.CLOUDSMITH_API_KEY }}
# command: "push"
# format: "deb"
# owner: "openhd"
# repo: "openhd-2-3-evo"
# distro: "ubuntu"
# release: "focal"
# republish: "true" # needed ONLY if version is not changing
# file: "*.deb"
63 changes: 63 additions & 0 deletions .github/workflows/ubuntu22.04.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# This is a basic workflow to help you get started with Actions

name: OpenHD Image Writer

on:
push:
branches:
- "2.5-evo"
- "dev-release"
- "release"
- "2.0"
paths-ignore:
- '**.md'
- '**.asciidoc'
- '**.adoc'
- '.gitignore'
- 'LICENSE'

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-22.04

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Runs a set of commands using the runners shell
- name: Build
run: |
sudo apt update
sudo apt upgrade -y
sudo apt install -y --no-install-recommends libgnutls28-dev build-essential devscripts debhelper cmake git libarchive-dev libcurl4-openssl-dev qtbase5-dev qtbase5-dev-tools qtdeclarative5-dev libqt5svg5-dev qttools5-dev libssl-dev qml-module-qtquick2 qml-module-qtquick-controls2 qml-module-qtquick-layouts qml-module-qtquick-templates2 qml-module-qtquick-window2 qml-module-qtgraphicaleffects
mkdir build
mv `ls -A | grep -v "build"` build
cd build
debuild -uc -us
cd ..
- name: Upload to Github
uses: 'actions/upload-artifact@v2'
with:
name: "OpenHD Image Writer"
path: |
*.deb
if-no-files-found: error

- name: Push
id: push
uses: cloudsmith-io/action@master
with:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}
command: "push"
format: "deb"
owner: "openhd"
repo: ${{ github.ref_name }}
distro: "ubuntu"
release: "jammy"
republish: "true" # needed ONLY if version is not changing
file: "*.deb"
72 changes: 72 additions & 0 deletions .github/workflows/ubuntu23.04.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# This is a basic workflow to help you get started with Actions

name: OpenHD Image Writer lunar

# Controls when the workflow will run
on:
push:
branches:
- "2.5-evo"
- "dev-release"
- "release"
paths-ignore:
- '**.md'
- '**.asciidoc'
- '**.adoc'
- '.gitignore'
- 'LICENSE'

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-22.04
container:
image: docker://ubuntu:lunar

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: initialise
run: |
echo "DT=$(date +'%Y-%m-%d_%H%M')" >> $GITHUB_ENV
echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
apt update
apt install -y git sudo
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

# Runs a set of commands using the runners shell
- name: Build
run: |
sudo apt update
sudo apt upgrade -y
sudo apt install -y --no-install-recommends libgnutls28-dev build-essential devscripts debhelper cmake git libarchive-dev libcurl4-openssl-dev qtbase5-dev qtbase5-dev-tools qtdeclarative5-dev libqt5svg5-dev qttools5-dev libssl-dev qml-module-qtquick2 qml-module-qtquick-controls2 qml-module-qtquick-layouts qml-module-qtquick-templates2 qml-module-qtquick-window2 qml-module-qtgraphicaleffects
mkdir build
mv `ls -A | grep -v "build"` build
cd build
debuild -uc -us
cd ..
- name: Upload to Github
uses: 'actions/upload-artifact@v3'
with:
name: "OpenHD Image Writer"
path: |
*.deb
if-no-files-found: error

- name: Push
id: push
uses: cloudsmith-io/action@master
with:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}
command: "push"
format: "deb"
owner: "openhd"
repo: ${{ github.ref_name }}
distro: "ubuntu"
release: "lunar"
republish: "true" # needed ONLY if version is not changing
file: "*.deb"

0 comments on commit 32216a6

Please sign in to comment.