Skip to content

Commit

Permalink
automatic template update of I2C Analyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcus10110 committed Dec 21, 2022
1 parent d62a9ab commit 1f6716b
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 118 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Build

on:
push:
branches: [master]
tags:
- '*'
pull_request:
branches: [master]

jobs:
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: |
cmake -B ${{github.workspace}}/build -A x64
cmake --build ${{github.workspace}}/build --config Release
- name: Upload windows build
uses: actions/upload-artifact@v2
with:
name: windows
path: ${{github.workspace}}/build/Analyzers/Release/*.dll
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release
cmake --build ${{github.workspace}}/build
- name: Upload MacOS build
uses: actions/upload-artifact@v2
with:
name: macos
path: ${{github.workspace}}/build/Analyzers/*.so
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release
cmake --build ${{github.workspace}}/build
- name: Upload Linux build
uses: actions/upload-artifact@v2
with:
name: linux
path: ${{github.workspace}}/build/Analyzers/*.so
publish:
needs: [windows, macos, linux]
runs-on: ubuntu-latest
steps:
- name: download individual builds
uses: actions/download-artifact@v2
with:
path: ${{github.workspace}}/artifacts
- name: zip
run: |
cd ${{github.workspace}}/artifacts
zip -r ${{github.workspace}}/analyzer.zip .
- uses: actions/upload-artifact@v2
with:
name: all-platforms
path: ${{github.workspace}}/artifacts/**
- name: create release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{github.workspace}}/analyzer.zip
38 changes: 30 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,19 @@ Saleae I2C Analyzer

## Getting Started

The following documentation describes getting this analyzer building locally. For more detailed information about the Analyzer SDK, debugging, CI build, and more, checkout the readme from the Sample Analyzer repository:

https://github.com/saleae/SampleAnalyzer

### MacOS

Dependencies:

- XCode with command line tools
- CMake 3.13+

Installing command line tools after XCode is installed:

```
xcode-select --install
```
Expand All @@ -22,22 +28,26 @@ Installing CMake on MacOS:
1. Download the binary distribution for MacOS, `cmake-*-Darwin-x86_64.dmg`
2. Install the usual way by dragging into applications.
3. Open a terminal and run the following:

```
/Applications/CMake.app/Contents/bin/cmake-gui --install
```
*Note: Errors may occur if older versions of CMake are installed.*

_Note: Errors may occur if older versions of CMake are installed._

Building the analyzer:

```
mkdir build
cd build
cmake ..
cmake --build .
```

### Ubuntu 16.04
### Ubuntu 18.04+

Dependencies:

- CMake 3.13+
- gcc 4.8+

Expand All @@ -48,6 +58,7 @@ sudo apt-get install build-essential
```

Building the analyzer:

```
mkdir build
cd build
Expand All @@ -58,15 +69,17 @@ cmake --build .
### Windows

Dependencies:
- Visual Studio 2015 Update 3

- Visual Studio 2019
- CMake 3.13+

**Visual Studio 2015**
**Visual Studio 2019**

*Note - newer versions of Visual Studio should be fine.*
_Note - newer and older versions of Visual Studio are likely to work._

Setup options:
- Programming Languages > Visual C++ > select all sub-components.

- Workloads > Desktop & Mobile > "Desktop development with C++"

Note - if CMake has any problems with the MSVC compiler, it's likely a component is missing.

Expand All @@ -76,14 +89,23 @@ Download and install the latest CMake release here.
https://cmake.org/download/

Building the analyzer:

```
mkdir build
cd build -A x64
cmake ..
cd build
cmake .. -A x64
```

Then, open the newly created solution file located here: `build\i2c_analyzer.sln`

The built analyzer DLLs will be located here:

`build\Analyzers\Debug`

`build\Analyzers\Release`

For debug and release builds, respectively.


## Output Frame Format

Expand Down
109 changes: 0 additions & 109 deletions azure-pipelines.yml

This file was deleted.

2 changes: 1 addition & 1 deletion cmake/ExternalAnalyzerSDK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if(NOT TARGET Saleae::AnalyzerSDK)
FetchContent_Declare(
analyzersdk
GIT_REPOSITORY https://github.com/saleae/AnalyzerSDK.git
GIT_TAG alpha
GIT_TAG master
GIT_SHALLOW True
GIT_PROGRESS True
)
Expand Down

0 comments on commit 1f6716b

Please sign in to comment.