Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
44 changes: 44 additions & 0 deletions .github/actions/assert-opendaq-installed/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: 'Assert openDAQ Installed'
description: 'Verify that openDAQ package is installed on the system'

inputs:
is-32bit:
description: 'Check for 32-bit installation on Windows'
required: false
default: false

runs:
using: composite
steps:
- name: Verify Installation (Linux)
if: runner.os == 'Linux'
shell: bash
run: |
if ! dpkg -l | grep -q opendaq; then
echo "::error::✗ Package not found"
exit 1
fi

- name: Verify Installation (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
if ("${{ inputs.is-32bit }}" -eq "true") {
$installPath = "C:\Program Files (x86)\openDAQ"
$binPath = "C:\Program Files (x86)\openDAQ\bin"
} else {
$installPath = "C:\Program Files\openDAQ"
$binPath = "C:\Program Files\openDAQ\bin"
}

# Assert installation directory exists
if (-not (Test-Path $installPath)) {
Write-Host "::error::✗ Installation directory not found: $installPath"
exit 1
}

# Assert bin directory is in PATH
if ($env:PATH -notlike "*$binPath*") {
Write-Host "::error::✗ PATH does not contain: $binPath"
exit 1
}
24 changes: 24 additions & 0 deletions .github/actions/assert-opendaq-version-equals/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 'Assert openDAQ Version Equals'
description: 'Verify that installed openDAQ version matches expected version'

inputs:
expected-version:
description: 'Expected version (with v prefix and optional suffix like v3.30.0-rc)'
required: true

runs:
using: composite
steps:
- name: Verify Version
shell: bash
run: |
ACTUAL_VERSION=$(dpkg -s opendaq | grep '^Version:' | awk '{print $2}')
EXPECTED_VERSION="${{ inputs.expected-version }}"
EXPECTED_VERSION="${EXPECTED_VERSION#v}"
EXPECTED_VERSION="${EXPECTED_VERSION%%-*}"

# Assert version matches
if [[ "$ACTUAL_VERSION" != "$EXPECTED_VERSION"* ]]; then
echo "::error::✗ Version mismatch: expected <$EXPECTED_VERSION> but was <$ACTUAL_VERSION>"
exit 1
fi
46 changes: 0 additions & 46 deletions .github/workflows/README.md

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/test-all-actions.yml

This file was deleted.

126 changes: 126 additions & 0 deletions .github/workflows/test-install-framework.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: Test Install Framework Action

on:
pull_request:
paths:
- 'install-framework/**'
- '.github/workflows/test-install-framework.yml'
push:
branches: [ main ]
paths:
- 'install-framework/**'
- '.github/workflows/test-install-framework.yml'
workflow_dispatch:

jobs:
ubuntu-autodetect:
name: Ubuntu Autodetect (${{ matrix.runner }})
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
runner:
- ubuntu-22.04
- ubuntu-22.04-arm
- ubuntu-24.04
- ubuntu-24.04-arm
- ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Framework (default version)
id: install
uses: ./install-framework

- name: Verify Installation
uses: ./.github/actions/assert-opendaq-installed

ubuntu-versions-explicit:
name: Ubuntu Versions Explicit (${{ matrix.version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 1
matrix:
version:
- v3.30.0
- v3.29.0-rc
- v3.30.0
- v3.19.4-rc
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Framework
id: install
uses: ./install-framework
with:
version: ${{ matrix.version }}

- name: Verify Framework Installed
uses: ./.github/actions/assert-opendaq-installed

- name: Verify Framework Version
uses: ./.github/actions/assert-opendaq-version-equals
with:
expected-version: ${{ matrix.version }}

ubuntu-versions-aliased:
name: Ubuntu Versions Aliased (${{ matrix.version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version:
- latest
- latest-stable
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Framework
id: install
uses: ./install-framework
with:
version: ${{ matrix.version }}

- name: Verify Framework Installed
uses: ./.github/actions/assert-opendaq-installed

- name: Verify Framework Version
uses: ./.github/actions/assert-opendaq-version-equals
with:
expected-version: ${{ steps.install.outputs.version }}

windows-autodetect:
name: Windows Autodetect
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Framework (default version)
id: install
uses: ./install-framework

- name: Verify Framework Installed
uses: ./.github/actions/assert-opendaq-installed

windows-autodetect-version-32bit:
name: Windows Autodetect Version (32-bit)
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Framework (32-bit)
id: install
uses: ./install-framework
with:
enable-32bit: true

- name: Verify Framework Installed
uses: ./.github/actions/assert-opendaq-installed
with:
is-32bit: true
19 changes: 6 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[![Test All Actions](https://github.com/openDAQ/actions/actions/workflows/test-all-actions.yml/badge.svg)](https://github.com/openDAQ/actions/actions/workflows/test-all-actions.yml)
# openDAQ/actions

A collection of reusable GitHub Actions for working with the [openDAQ Framework](https://github.com/openDAQ).
Expand All @@ -7,21 +6,15 @@ A collection of reusable GitHub Actions for working with the [openDAQ Framework]

## 📦 Available Actions

> TODO: put an available actions list here:
### [install-framework](./install-framework)

- [ ] framework-download-artifact
- [ ] framework-download-release
- [ ] framework-install-package
[![Test Install Framework Action](https://github.com/openDAQ/actions/actions/workflows/test-install-framework.yml/badge.svg)](https://github.com/openDAQ/actions/actions/workflows/test-install-framework.yml)

---

## 🧪 CI / Testing

We run automated tests for all actions using the **Test All Actions workflow**.
Download and install openDAQ framework packages from GitHub releases.

- Runs automatically on `push` to `main` and on `pull_request` events.
- Ensures that all actions work correctly.
- See [testing workflow details](./.github/workflows/README.md)
```yaml
- uses: openDAQ/actions/install-framework@main
```

---

Expand Down
Loading