Skip to content
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
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
9 changes: 9 additions & 0 deletions .github/workflows/build-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Nightly build
on:
schedule:
- cron: "51 3 * * *"
workflow_dispatch:

jobs:
nightly-build:
uses: ./.github/workflows/build.yml
103 changes: 103 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Build
on: [push, workflow_call]

permissions:
contents: write

jobs:
lint:
runs-on: "windows-latest"
steps:
- uses: actions/checkout@v4
- name: install stable rust
run: rustup install stable
- uses: Swatinem/rust-cache@v2
- name: Format check
run: cargo fmt --check
- name: Clippy
run: cargo clippy -- --deny warnings
docs:
runs-on: "windows-latest"
steps:
- uses: actions/checkout@v4
- name: install stable rust
run: rustup install stable
- uses: Swatinem/rust-cache@v2
- name: Build docs
run: cargo doc --no-deps
- name: Generate index.html
shell: cmd
# u wot?
run: |
echo|set /p="<meta http-equiv="refresh" content="0; url=ick/">" > target/doc/index.html
exit /B 0
- name: Upload artifacts (docs)
uses: actions/upload-artifact@v4
with:
name: docs
path: |
target/doc
if-no-files-found: error
retention-days: 1
- name: Deploy docs
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/initial' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: target/doc
force_orphan: true
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ "ubuntu-latest", "windows-latest" ]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any point running the tests on linux if we wrap wincred?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and is there benefit to running these as separate jobs rather than steps within a job?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ick json is usable on linux, although whether that's a useful enough thing by itself I'm unsure? Happy to just go to windows-only depending what you prefer?

(originally I also had an ick ssh, but that's superceded by just using key-based auth)...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

up to you really - maybe not needed

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll leave as-is for the moment and we can revisit if we want / next time (if ever) we end up touching this tool.

fail-fast: false
steps:
- uses: actions/checkout@v4
- name: install stable rust
run: rustup install stable
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.os }}
- name: Unit tests
run: cargo test
- name: Unit tests (release mode)
run: cargo test --release
- name: Build (debug)
run: cargo build
- name: Build (release)
run: cargo build --release
- name: Upload artifacts (debug)
uses: actions/upload-artifact@v4
with:
name: ${{ format('debug-{0}', matrix.os) }}
path: |
target/debug/ick
target/debug/ick.exe
target/debug/ick.pdb
if-no-files-found: error
retention-days: 1
- name: Upload artifacts (release)
uses: actions/upload-artifact@v4
with:
name: ${{ format('release-{0}', matrix.os) }}
path: |
target/release/ick
target/release/ick.exe
target/release/ick.pdb
if-no-files-found: error
retention-days: 1
results:
if: ${{ always() }}
runs-on: ubuntu-latest
name: Final Results
needs: [tests, lint, docs]
steps:
- run: exit 1
# see https://stackoverflow.com/a/67532120/4907315
if: >-
${{
contains(needs.*.result, 'failure')
|| contains(needs.*.result, 'cancelled')
}}
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Cargo
# will have compiled files and executables
debug
target

# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

# Generated by cargo mutants
# Contains mutation testing data
**/mutants.out*/

# RustRover
.idea/
Loading
Loading