Skip to content

Commit

Permalink
Make IO Error (#2)
Browse files Browse the repository at this point in the history
Co-authored-by: Action <[email protected]>
  • Loading branch information
wilsonwatson and wilsonwatson authored Jan 29, 2024
1 parent 4f98b90 commit 12d309d
Show file tree
Hide file tree
Showing 16 changed files with 1,863 additions and 40 deletions.
82 changes: 82 additions & 0 deletions .github/workflows/gen_io_types.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: CI
on:
push:
workflow_dispatch:
permissions:
contents: write
jobs:
gen_io_types:
runs-on: ubuntu-latest
env:
# This line prevents the action from running after an automated push.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
# Check out push
- uses: actions/checkout@v3
# Install Rust
- uses: dtolnay/rust-toolchain@stable
# Generate IOTypes.java
- name: Run gen_io_types
working-directory: gen_io_types
run: cargo run
- name: Install openjdk17
run: sudo apt-get install openjdk-17-jdk
# Grant execute permission for gradlew
- name: Grant execute permission for gradlew
run: chmod +x gradlew
# Runs a single command using the runners shell
- name: Compile and run tests on robot code
run: ./gradlew build
# Commit and push new type
- name: Commit IOTypes
run: |
git config --global user.name 'Action'
git config --global user.email '[email protected]'
git add -f src/main/java/org/frc5572/robotools/IOTypes.java
git commit -m "Generate IOTypes.java" || true
git push
linting:
name: Linting
runs-on: ubuntu-latest
env:
# This line prevents the action from running after an automated push.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v3 # v2 minimum required
- name: Run check style
uses: nikitasavinov/checkstyle-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: 'github-check'
tool_name: 'testtool'
fail_on_error: true
filter_mode: nofilter
level: error
checkstyle_config: checks.xml
checkstyle_version: '9.2.1'
spell_check:
name: Spell Check
runs-on: ubuntu-latest
env:
# This line prevents the action from running after an automated push.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v3 # v2 minimum required
- name: Run Spell Check
uses: codespell-project/actions-codespell@master
with:
check_filenames: true
merge_conflict_job:
runs-on: ubuntu-latest
name: Find merge conflicts
env:
# This line prevents the action from running after an automated push.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
# Checkout the source code so there are some files to look at.
- uses: actions/checkout@v3
# Run the actual merge conflict finder
- name: Merge Conflict finder
uses: olivernybroe/[email protected]
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,5 @@ bin/

# Simulation GUI and other tools window save file
*-window.json

/src/main/java/org/frc5572/robotools/IOTypes.java
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ tasks.withType(JavaCompile) {
options.compilerArgs << '--add-exports' << 'jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED'
}

sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
// sourceCompatibility = JavaVersion.VERSION_17
// targetCompatibility = JavaVersion.VERSION_17

repositories {
mavenCentral()
}

dependencies {
implementation 'fr.inria.gforge.spoon:spoon-core:10.4.2'

}

publishing {
Expand Down
Loading

0 comments on commit 12d309d

Please sign in to comment.