Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lint checks for YAML files and a GitHub workflow to run linting checks. #47

Merged
merged 6 commits into from
Jun 24, 2024
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
68 changes: 34 additions & 34 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
name: "Bug Report"
description: Report software deficiencies
description: "Report software deficiencies"
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Use this form to report any functional or performance bugs you've found in the software.

Be sure to check if your [issue](https://github.com/y-scope/clp-ffi-java/issues) has already
been reported.
- type: "markdown"
attributes:
value: |
Use this form to report any functional or performance bugs you've found in the software.

- type: textarea
attributes:
label: Bug
description: "Describe what's wrong and if applicable, what you expected instead."
validations:
required: true
Be sure to check if your [issue](https://github.com/y-scope/clp-ffi-java/issues) has already
been reported.

- type: input
attributes:
label: clp-ffi version
description: "The release version number or development commit hash that has the bug."
placeholder: "Version number or commit hash"
validations:
required: true
- type: "textarea"
attributes:
label: "Bug"
description: "Describe what's wrong and if applicable, what you expected instead."
validations:
required: true

- type: textarea
attributes:
label: Environment
description: "The environment in which you're using clp-ffi."
placeholder: "OS version, Java version, etc."
validations:
required: true
- type: "input"
attributes:
label: "clp-ffi version"
description: "The release version number or development commit hash that has the bug."
placeholder: "Version number or commit hash"
validations:
required: true

- type: textarea
attributes:
label: Reproduction steps
description: "List each step required to reproduce the bug."
validations:
required: true
- type: "textarea"
attributes:
label: "Environment"
description: "The environment in which you're using clp-ffi."
placeholder: "OS version, Java version, etc."
validations:
required: true

- type: "textarea"
attributes:
label: "Reproduction steps"
description: "List each step required to reproduce the bug."
validations:
required: true
34 changes: 17 additions & 17 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
name: "Feature/Change Request"
description: Request a feature or change
description: "Request a feature or change"
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Use this form to request a feature/change in the software, or the project as a whole.
- type: "markdown"
attributes:
value: |
Use this form to request a feature/change in the software, or the project as a whole.

- type: textarea
attributes:
label: Request
description: "Describe your request and why it's important."
validations:
required: true
- type: "textarea"
attributes:
label: "Request"
description: "Describe your request and why it's important."
validations:
required: true

- type: textarea
attributes:
label: Possible implementation
description: "Describe any implementations you have in mind."
validations:
required: true
- type: "textarea"
attributes:
label: "Possible implementation"
description: "Describe any implementations you have in mind."
validations:
required: true
10 changes: 5 additions & 5 deletions .github/actions/native-lib-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ description: "Builds libclp-ffi-java on the current platform"
runs:
using: "composite"
steps:
- name: Build and test
run: mvn --batch-mode test
shell: bash
- name: "Build and test"
run: "mvn --batch-mode test"
shell: "bash"

- name: Bundle
- name: "Bundle"
# NOTE: We need the validate phase to run first, to perform a regex
# replacement on the OS name
run: |
mvn --batch-mode validate assembly:single@assemble-lib-dir
mv ./target/clp-ffi-*-native-lib $GITHUB_WORKSPACE/.
shell: bash
shell: "bash"
80 changes: 40 additions & 40 deletions .github/workflows/build-and-release-package.yml
Original file line number Diff line number Diff line change
@@ -1,70 +1,70 @@
name: build-and-release-package
name: "build-and-release-package"

on:
workflow_dispatch:

concurrency: build-${{github.ref}}
concurrency: "build-${{github.ref}}"

jobs:
build-lib-for-macos:
runs-on: macos-latest
runs-on: "macos-latest"
steps:
- uses: actions/checkout@v4
- uses: "actions/checkout@v4"
with:
submodules: recursive
submodules: "recursive"

- name: Install requirements
run: brew install cmake gcc java11 maven
- name: "Install requirements"
run: "brew install cmake gcc java11 maven"

- name: Build native library for MacOS
id: build
uses: ./.github/actions/native-lib-build
- name: "Build native library for MacOS"
id: "build"
uses: "./.github/actions/native-lib-build"

- uses: actions/upload-artifact@v4
- uses: "actions/upload-artifact@v4"
with:
name: libclp-ffi-java-macos
path: ${{github.workspace}}/clp-ffi-*-native-lib/
if-no-files-found: error
name: "libclp-ffi-java-macos"
path: "${{github.workspace}}/clp-ffi-*-native-lib/"
if-no-files-found: "error"
retention-days: 1

build-package:
needs: build-lib-for-macos
runs-on: ubuntu-20.04
needs: "build-lib-for-macos"
runs-on: "ubuntu-20.04"
permissions:
contents: read
packages: write
contents: "read"
packages: "write"
steps:
- uses: actions/checkout@v4
- uses: "actions/checkout@v4"
with:
submodules: recursive
submodules: "recursive"

- uses: actions/setup-java@v4
- uses: "actions/setup-java@v4"
with:
java-version: '11'
distribution: 'temurin'
server-id: 'ossrh'
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
java-version: "11"
distribution: "temurin"
server-id: "ossrh"
server-username: "MAVEN_USERNAME"
server-password: "MAVEN_PASSWORD"
gpg-private-key: "${{ secrets.GPG_PRIVATE_KEY }}"
gpg-passphrase: "MAVEN_GPG_PASSPHRASE"

- name: Install requirements
- name: "Install requirements"
run: |
sudo apt update
sudo apt install -y build-essential cmake

- name: Build native library for Linux
id: build
uses: ./.github/actions/native-lib-build
- name: "Build native library for Linux"
id: "build"
uses: "./.github/actions/native-lib-build"

- uses: actions/download-artifact@v4
- uses: "actions/download-artifact@v4"
with:
name: libclp-ffi-java-macos
path: ./target/.
name: "libclp-ffi-java-macos"
path: "./target/."

- name: Build package, run tests, and deploy to GitHub
run: mvn --batch-mode deploy -Pmaven_release
- name: "Build package, run tests, and deploy to GitHub"
run: "mvn --batch-mode deploy -Pmaven_release"
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
MAVEN_USERNAME: "${{ secrets.OSSRH_USERNAME }}"
MAVEN_PASSWORD: "${{ secrets.OSSRH_TOKEN }}"
MAVEN_GPG_PASSPHRASE: "${{ secrets.GPG_PASSPHRASE }}"
110 changes: 55 additions & 55 deletions .github/workflows/build-package.yml
Original file line number Diff line number Diff line change
@@ -1,90 +1,90 @@
name: build-package
name: "build-package"

on:
push:
branches: [ main ]
branches: ["main"]
paths:
- '.github/actions/native-lib-build/action.yml'
- '.github/workflows/build-and-release-package.yml'
- '.github/workflows/build-package.yml'
- 'assembly-lib.xml'
- 'assembly-package.xml'
- 'CMakeLists.txt'
- 'pom.xml'
- 'src/**'
- ".github/actions/native-lib-build/action.yml"
- ".github/workflows/build-and-release-package.yml"
- ".github/workflows/build-package.yml"
- "assembly-lib.xml"
- "assembly-package.xml"
- "CMakeLists.txt"
- "pom.xml"
- "src/**"
pull_request:
branches: [ main ]
branches: ["main"]
paths:
- '.github/actions/native-lib-build/action.yml'
- '.github/workflows/build-and-release-package.yml'
- '.github/workflows/build-package.yml'
- 'assembly-lib.xml'
- 'assembly-package.xml'
- 'CMakeLists.txt'
- 'pom.xml'
- 'src/**'
- ".github/actions/native-lib-build/action.yml"
- ".github/workflows/build-and-release-package.yml"
- ".github/workflows/build-package.yml"
- "assembly-lib.xml"
- "assembly-package.xml"
- "CMakeLists.txt"
- "pom.xml"
- "src/**"
workflow_dispatch:

concurrency: build-${{github.ref}}
concurrency: "build-${{github.ref}}"

jobs:
build-lib-for-macos:
runs-on: macos-latest
runs-on: "macos-latest"
steps:
- uses: actions/checkout@v4
- uses: "actions/checkout@v4"
with:
submodules: recursive
submodules: "recursive"

- name: Install requirements
run: brew install cmake gcc java11 maven
- name: "Install requirements"
run: "brew install cmake gcc java11 maven"

- name: Build native library
id: build
uses: ./.github/actions/native-lib-build
- name: "Build native library"
id: "build"
uses: "./.github/actions/native-lib-build"

- uses: actions/upload-artifact@v4
- uses: "actions/upload-artifact@v4"
with:
name: libclp-ffi-java-macos
path: ${{github.workspace}}/clp-ffi-*-native-lib/
if-no-files-found: error
name: "libclp-ffi-java-macos"
path: "${{github.workspace}}/clp-ffi-*-native-lib/"
if-no-files-found: "error"
retention-days: 1

build-package:
needs: build-lib-for-macos
runs-on: ubuntu-20.04
needs: "build-lib-for-macos"
runs-on: "ubuntu-20.04"
permissions:
contents: read
packages: write
contents: "read"
packages: "write"
steps:
- uses: actions/checkout@v4
- uses: "actions/checkout@v4"
with:
submodules: recursive
submodules: "recursive"

- uses: actions/setup-java@v4
- uses: "actions/setup-java@v4"
with:
java-version: '11'
distribution: 'temurin'
server-id: 'github'
java-version: "11"
distribution: "temurin"
server-id: "github"

- name: Install requirements
- name: "Install requirements"
run: |
sudo apt update
sudo apt install -y build-essential cmake

- name: Build native library for Linux
id: build
uses: ./.github/actions/native-lib-build
- name: "Build native library for Linux"
id: "build"
uses: "./.github/actions/native-lib-build"

- uses: actions/download-artifact@v4
- uses: "actions/download-artifact@v4"
with:
name: libclp-ffi-java-macos
path: ./target/.
name: "libclp-ffi-java-macos"
path: "./target/."

- name: Build package and run tests
run: mvn --batch-mode test
- name: "Build package and run tests"
run: "mvn --batch-mode test"

- name: Deploy to GitHub
if: github.event_name != 'pull_request'
run: mvn --batch-mode deploy -DskipTests -Pgithub_release
- name: "Deploy to GitHub"
if: "github.event_name != 'pull_request'"
run: "mvn --batch-mode deploy -DskipTests -Pgithub_release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
Loading
Loading