Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Oblomov/clinfo
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: ahoylabs/clinfo
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 3 commits
  • 5 files changed
  • 1 contributor

Commits on Jul 28, 2023

  1. added github action for builds

    biw committed Jul 28, 2023
    Copy the full SHA
    d2baa06 View commit details

Commits on Aug 10, 2023

  1. small linting

    biw committed Aug 10, 2023
    Copy the full SHA
    49995d7 View commit details
  2. Copy the full SHA
    826893c View commit details
Showing with 1,767 additions and 1,502 deletions.
  1. +0 −24 .appveyor.yml
  2. +90 −0 .github/workflows/build.yml
  3. +6 −0 .gitignore
  4. +13 −10 README.md
  5. +1,658 −1,468 src/clinfo.c
24 changes: 0 additions & 24 deletions .appveyor.yml

This file was deleted.

90 changes: 90 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: CI

on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]

env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

jobs:
windows:
runs-on: windows-latest
steps:
- name: Clone
id: checkout
uses: actions/checkout@v1

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
with:
msbuild-architecture: x64

- uses: ilammy/msvc-dev-cmd@v1

- name: Install OpenCL
run: .\fetch-opencl-dev-win.cmd x64

- name: Build
id: build_script
run: .\make.cmd

- name: Test
run: .\clinfo.exe

- name: Upload artifacts
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
uses: actions/upload-artifact@v3
with:
path: |
clinfo.exe
release:
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}

runs-on: ubuntu-latest

needs:
- windows

steps:
- name: Download artifacts
id: download-artifact
uses: actions/download-artifact@v3

- name: Get commit hash
id: commit
uses: pr-mpt/actions-commit-hash@v2

- name: Create release
id: create_release
uses: anzz1/action-create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}

- name: Upload release
id: upload_release
uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const path = require('path');
const fs = require('fs');
const release_id = '${{ steps.create_release.outputs.id }}';
for (let file of await fs.readdirSync('./artifact')) {
if (path.extname(file) === '.exe') {
console.log('uploadReleaseAsset', file);
await github.repos.uploadReleaseAsset({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: release_id,
name: file,
data: await fs.readFileSync(`./artifact/${file}`)
});
}
}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
clinfo
.*.swp
*.o
include/
lib/
*.exe
OpenCL.lib
*.pdb
*.obj
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Warning

**This is modified and not designed to be a 1-to-1 clone of [Oblomov/clinfo](https://github.com/Oblomov/clinfo)**

Please see [Oblomov/clinfo](https://github.com/Oblomov/clinfo)

# What is this?

clinfo is a simple command-line application that enumerates all possible
@@ -22,14 +28,14 @@ Refer to the man page for further information.

## Use cases

* verify that your OpenCL environment is set up correctly;
- verify that your OpenCL environment is set up correctly;
if `clinfo` cannot find any platform or devices (or fails to load
the OpenCL dispatcher library), chances are high no other OpenCL
application will run;
* verify that your OpenCL _development_ environment is set up
- verify that your OpenCL _development_ environment is set up
correctly: if `clinfo` fails to build, chances are high no
other OpenCL application will build;
* explore/report the actual properties of the available device(s).
- explore/report the actual properties of the available device(s).

## Segmentation faults

@@ -47,7 +53,6 @@ properties or as extensions), but are not shown by `clinfo`, please [open
an issue](https://github.com/Oblomov/clinfo/issues) providing as much
information as you can. Patches and pull requests accepted too.


# Building

<img
@@ -76,15 +81,14 @@ as well as via F-Droid.

Inside Termux, you will first need to install some common tools:

pkg install git make clang -y

pkg install git make clang -y

You will also need to clone the `clinfo` repository, and fetch the
OpenCL headers (we'll use the official `KhronosGroup/OpenCL-Headers`
repository for that):

git clone https://github.com/Oblomov/clinfo
git clone https://github.com/KhronosGroup/OpenCL-Headers
git clone https://github.com/Oblomov/clinfo
git clone https://github.com/KhronosGroup/OpenCL-Headers

(I prefer doing this from a `src` directory I have created for
development, but as long as `clinfo` and `OpenCL-Headers` are sibling
@@ -98,7 +102,7 @@ You can then `cd clinfo` and build the application. You can try simply
running `make` since Android should be autodetected now, buf it
this fails you can also force the detectio with

make OS=Android
make OS=Android

If linking fails due to a missing `libOpenCL.so`, then your Android
machine probably doesn't support OpenCL. Otherwise, you should have a
@@ -131,7 +135,6 @@ you can use

make OS=Homebrew


## Windows support

The application can usually be built in Windows too (support for which
Loading