Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
19 changes: 3 additions & 16 deletions .github/workflows/test-bash-framework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Test Bash Framework
on:
push:
branches: [main]
paths-ignore: [ 'docs/**', '**/*.md' ]
paths: [ 'scripts-demo/**', 'tests/shell/bash/**' ]
pull_request:
paths-ignore: [ 'docs/**', '**/*.md' ]
paths: [ 'scripts-demo/**', 'tests/shell/bash/**' ]
workflow_dispatch:

jobs:
Expand All @@ -21,14 +21,8 @@ jobs:
- os: ubuntu-latest
shell-name: bash
shell-cmd: bash
- os: ubuntu-latest
shell-name: zsh
shell-cmd: zsh

# macOS - bash and zsh
- os: macos-latest
shell-name: bash
shell-cmd: bash
# macOS - zsh
- os: macos-latest
shell-name: zsh
shell-cmd: zsh
Expand All @@ -42,13 +36,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Install zsh (Ubuntu only)
if: matrix.os == 'ubuntu-latest' && matrix.shell-name == 'zsh'
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y zsh

- name: Run demo tests (excluding intentional failures)
shell: bash
working-directory: tests/shell/bash
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/test-bash-scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Test Bash Scripts
on:
push:
branches: [main]
paths-ignore: [ 'docs/**', '**/*.md' ]
paths: [ 'scripts/**', 'tests/shell/bash/**' ]
pull_request:
paths-ignore: [ 'docs/**', '**/*.md' ]
paths: [ 'scripts/**', 'tests/shell/bash/**' ]
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -34,7 +34,8 @@ jobs:
working-directory: tests/shell/bash
run: |
./test-runner.sh \
--fail-fast true
--fail-fast true \
--verbose

- name: Test results summary
if: always()
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/test-framework-compose-filename-manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: "Call action manually: framework compose filename"

on:
workflow_dispatch:
inputs:
runner:
description: "Runner to use (e.g. ubuntu-latest, ubuntu-22.04, windows-latest, etc)"
type: string
required: false
default: ubuntu-latest
version:
description: 'OpenDAQ version (if not set, resolves to latest from openDAQ/openDAQ)'
required: false
platform:
description: 'Target platform (if not set, auto-detected)'
required: false
packaging:
description: 'Packaging format for cpack (if not set, uses runner OS name)'
required: false

jobs:
test-compose-filename-manually:
runs-on: ${{ inputs.runner }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Compose openDAQ framework filename
id: call-framework-compose-filename
uses: ./framework-compose-filename
with:
version: ${{ inputs.version }}
platform: ${{ inputs.platform }}
packaging: ${{ inputs.packaging }}

- name: Display Results
shell: bash
run: |
echo "╔══════════════════════════════════════════════════════════════════════════════╗"
echo "║ Package Filename Composition Results ║"
echo "╠══════════════════════════════════════════════════════════════════════════════╣"
echo "║ 🏷️ Version (full): ${{ steps.call-framework-compose-filename.outputs.version }}"
echo "║ ├─ Major: ${{ steps.call-framework-compose-filename.outputs.version-major }}"
echo "║ ├─ Minor: ${{ steps.call-framework-compose-filename.outputs.version-minor }}"
echo "║ ├─ Patch: ${{ steps.call-framework-compose-filename.outputs.version-patch }}"
echo "║ ├─ Suffix: ${{ steps.call-framework-compose-filename.outputs.version-suffix || '*** NOT SET ***' }}"
echo "║ └─ Hash: ${{ steps.call-framework-compose-filename.outputs.version-hash || '*** NOT SET ***' }}"
echo "╠══════════════════════════════════════════════════════════════════════════════╣"
echo "║ 🖥️ Platform (full): ${{ steps.call-framework-compose-filename.outputs.platform }}"
echo "║ ├─ OS Name: ${{ steps.call-framework-compose-filename.outputs.platform-os-name }}"
echo "║ ├─ OS Version: ${{ steps.call-framework-compose-filename.outputs.platform-os-version }}"
echo "║ └─ Architecture: ${{ steps.call-framework-compose-filename.outputs.platform-os-arch }}"
echo "╠══════════════════════════════════════════════════════════════════════════════╣"
echo "║ 📦 Packaging: ${{ steps.call-framework-compose-filename.outputs.packaging }}"
echo "╠══════════════════════════════════════════════════════════════════════════════╣"
echo "║ 📄 Filename: ${{ steps.call-framework-compose-filename.outputs.filename }}"
echo "╚══════════════════════════════════════════════════════════════════════════════╝"
82 changes: 82 additions & 0 deletions .github/workflows/test-framework-download-release-manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Test Download Release Asset

on:
workflow_dispatch:
inputs:
runner-os:
description: 'Runner OS to use'
required: true
type: string
default: 'ubuntu-latest'

version:
description: 'Release version (e.g., v3.20.4) or "latest"'
required: false
type: string
default: 'latest'

platform:
description: 'Target platform (e.g., ubuntu22.04-x86_64, win64) or leave empty for auto-detect'
required: false
type: string
default: ''

packaging:
description: 'Package format override (e.g., deb, exe, tar.gz, zip) or leave empty for auto-detect'
required: false
type: string
default: ''

asset-pattern:
description: 'Custom glob pattern to filter assets (overrides auto-detection)'
required: false
type: string
default: ''

output-dir:
description: 'Output directory for downloaded assets (leave empty for runner.temp)'
required: false
type: string
default: ''

verbose:
description: 'Enable verbose output'
required: false
type: boolean
default: true

jobs:
download-release:
name: Download on ${{ inputs.runner-os }}
runs-on: ${{ inputs.runner-os }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Download OpenDAQ release asset
id: download
uses: ./framework-download-release
with:
version: ${{ inputs.version }}
platform: ${{ inputs.platform }}
packaging: ${{ inputs.packaging }}
asset-pattern: ${{ inputs.asset-pattern }}
output-dir: ${{ inputs.output-dir }}
verbose: ${{ inputs.verbose }}

- name: Display results
shell: bash
run: |
echo "=== Download Results ==="
echo ""
echo "📦 Asset: ${{ steps.download.outputs.asset-filename }}"
echo "📍 Path: ${{ steps.download.outputs.asset }}"
echo "📂 Directory: ${{ steps.download.outputs.asset-dir }}"
echo ""
echo "🏷️ Version: ${{ steps.download.outputs.version }}"
echo "🖥️ Platform: ${{ steps.download.outputs.platform }}"
echo "📦 Packaging: ${{ steps.download.outputs.packaging }}"
echo ""
echo "📊 Size: ${{ steps.download.outputs.asset-filesize }} bytes"
echo "🔐 SHA256: ${{ steps.download.outputs.asset-checksum }}"
122 changes: 122 additions & 0 deletions framework-install/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# Install openDAQ Framework Package

This action installs the openDAQ framework package on Windows and Linux runners.

## Usage

```yaml
- uses: openDAQ/install-opendaq-action@v1
with:
# Full path to the openDAQ framework package file
# Required
framework-filename: ''
```

## Inputs

### `framework-filename`

**Required** Full path to the openDAQ framework package file.

- **Windows**: Path to `.exe` installer (e.g., `opendaq-v3.20.4-win64.exe`)
- **Linux**: Path to `.deb` package (e.g., `opendaq-v3.20.4-ubuntu20.04-x86_64.deb`)

## Supported Platforms

- ✅ Windows (via `.exe` installer)
- ✅ Linux (via `.deb` package)
- ❌ macOS (not yet supported)

## Examples

### Install from downloaded artifact

```yaml
steps:
- name: Download openDAQ package
uses: actions/download-artifact@v4
with:
name: opendaq-package
path: ${{ runner.temp }}/packages

- name: Install openDAQ
uses: openDAQ/install-opendaq-action@v1
with:
framework-filename: ${{ runner.temp }}/packages/opendaq-v3.20.4-win64.exe
```

### Install from release

```yaml
steps:
- name: Download openDAQ release
run: |
curl -L -o ${{ runner.temp }}/opendaq.deb \
https://github.com/openDAQ/openDAQ/releases/download/v3.20.4/opendaq-v3.20.4-ubuntu22.04-x86_64.deb

- name: Install openDAQ
uses: openDAQ/install-opendaq-action@v1
with:
framework-filename: ${{ runner.temp }}/opendaq.deb
```

### Matrix build with multiple platforms

```yaml
jobs:
test:
strategy:
matrix:
include:
- os: ubuntu-22.04
package: opendaq-v3.20.4-ubuntu22.04-x86_64.deb
- os: ubuntu-20.04
package: opendaq-v3.20.4-ubuntu20.04-x86_64.deb
- os: windows-2022
package: opendaq-v3.20.4-win64.exe

runs-on: ${{ matrix.os }}

steps:
- name: Download package
run: |
# Download logic here
# Save to ${{ runner.temp }}/${{ matrix.package }}

- name: Install openDAQ
uses: openDAQ/install-opendaq-action@v1
with:
framework-filename: ${{ runner.temp }}/${{ matrix.package }}

- name: Verify installation
run: |
# Your verification commands
```

## How It Works

### Windows
1. Runs the `.exe` installer with `/S` (silent) flag
2. Waits for installation to complete
3. Adds `C:\Program Files\openDAQ\bin` to `PATH`
4. Verifies exit code

### Linux
1. Uses `dpkg -i` with `sudo` to install the `.deb` package
2. Package dependencies are automatically resolved

## Post-Installation

After successful installation:

- **Windows**: The openDAQ binaries are added to `PATH`
- **Linux**: The openDAQ libraries are installed system-wide

You can immediately use openDAQ commands and libraries in subsequent steps.

## Error Handling

The action will fail if:
- The package file doesn't exist
- Installation returns a non-zero exit code
- The runner OS is not supported (macOS)
50 changes: 50 additions & 0 deletions framework-install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Install openDAQ framework package

inputs:
framework-filename:
required: true
description: Full path to the openDAQ framework package file

runs:
using: composite

steps:
- name: Convert path for Windows
if: runner.os == 'Windows'
id: windows-path
shell: bash
run: |
# Convert Unix-style path to Windows-style
windowsPath=$(cygpath -w "${{ inputs.framework-filename }}")
echo "path=$windowsPath" >> $GITHUB_OUTPUT

- name: Install openDAQ framework package (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
$packagePath = "${{ steps.windows-path.outputs.path }}"
Write-Host "Installing from: $packagePath"

$process = Start-Process -FilePath $packagePath -ArgumentList "/S" -Wait -NoNewWindow -PassThru
if ($process.ExitCode -eq 0) {
Write-Host "OpenDAQ installed successfully, updating PATH..."
$openDAQBin = "C:\Program Files\openDAQ\bin"
Add-Content -Path $env:GITHUB_ENV -Value "PATH=$openDAQBin`;$env:PATH"
Write-Host $env:PATH
}
else {
Write-Host "OpenDAQ installation failed with exit code $($process.ExitCode)"
exit $process.ExitCode
}

- name: Install openDAQ framework package (Linux)
if: runner.os == 'Linux'
shell: bash
run: sudo dpkg -i "${{ inputs.framework-filename }}"

- name: Unsupported runner OS
if: runner.os != 'Windows' && runner.os != 'Linux'
shell: bash
run: |
echo "Install openDAQ is not supported for ${{ runner.os }}"
exit 1
Loading