Skip to content

Commit 66157e9

Browse files
authored
Merge pull request #1 from ISISComputingGroup/initial
Initial
2 parents 009ee05 + 03266be commit 66157e9

10 files changed

Lines changed: 2369 additions & 0 deletions

File tree

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "cargo"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
interval: "weekly"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: Nightly build
2+
on:
3+
schedule:
4+
- cron: "51 3 * * *"
5+
workflow_dispatch:
6+
7+
jobs:
8+
nightly-build:
9+
uses: ./.github/workflows/build.yml

.github/workflows/build.yml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: Build
2+
on: [push, workflow_call]
3+
4+
permissions:
5+
contents: write
6+
7+
jobs:
8+
lint:
9+
runs-on: "windows-latest"
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: install stable rust
13+
run: rustup install stable
14+
- uses: Swatinem/rust-cache@v2
15+
- name: Format check
16+
run: cargo fmt --check
17+
- name: Clippy
18+
run: cargo clippy -- --deny warnings
19+
docs:
20+
runs-on: "windows-latest"
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: install stable rust
24+
run: rustup install stable
25+
- uses: Swatinem/rust-cache@v2
26+
- name: Build docs
27+
run: cargo doc --no-deps
28+
- name: Generate index.html
29+
shell: cmd
30+
# u wot?
31+
run: |
32+
echo|set /p="<meta http-equiv="refresh" content="0; url=ick/">" > target/doc/index.html
33+
exit /B 0
34+
- name: Upload artifacts (docs)
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: docs
38+
path: |
39+
target/doc
40+
if-no-files-found: error
41+
retention-days: 1
42+
- name: Deploy docs
43+
uses: peaceiris/actions-gh-pages@v3
44+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/initial' }}
45+
with:
46+
publish_branch: gh-pages
47+
github_token: ${{ secrets.GITHUB_TOKEN }}
48+
publish_dir: target/doc
49+
force_orphan: true
50+
tests:
51+
runs-on: ${{ matrix.os }}
52+
strategy:
53+
matrix:
54+
os: [ "ubuntu-latest", "windows-latest" ]
55+
fail-fast: false
56+
steps:
57+
- uses: actions/checkout@v4
58+
- name: install stable rust
59+
run: rustup install stable
60+
- uses: Swatinem/rust-cache@v2
61+
with:
62+
key: ${{ matrix.os }}
63+
- name: Unit tests
64+
run: cargo test
65+
- name: Unit tests (release mode)
66+
run: cargo test --release
67+
- name: Build (debug)
68+
run: cargo build
69+
- name: Build (release)
70+
run: cargo build --release
71+
- name: Upload artifacts (debug)
72+
uses: actions/upload-artifact@v4
73+
with:
74+
name: ${{ format('debug-{0}', matrix.os) }}
75+
path: |
76+
target/debug/ick
77+
target/debug/ick.exe
78+
target/debug/ick.pdb
79+
if-no-files-found: error
80+
retention-days: 1
81+
- name: Upload artifacts (release)
82+
uses: actions/upload-artifact@v4
83+
with:
84+
name: ${{ format('release-{0}', matrix.os) }}
85+
path: |
86+
target/release/ick
87+
target/release/ick.exe
88+
target/release/ick.pdb
89+
if-no-files-found: error
90+
retention-days: 1
91+
results:
92+
if: ${{ always() }}
93+
runs-on: ubuntu-latest
94+
name: Final Results
95+
needs: [tests, lint, docs]
96+
steps:
97+
- run: exit 1
98+
# see https://stackoverflow.com/a/67532120/4907315
99+
if: >-
100+
${{
101+
contains(needs.*.result, 'failure')
102+
|| contains(needs.*.result, 'cancelled')
103+
}}

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Generated by Cargo
2+
# will have compiled files and executables
3+
debug
4+
target
5+
6+
# These are backup files generated by rustfmt
7+
**/*.rs.bk
8+
9+
# MSVC Windows builds of rustc generate these, which store debugging information
10+
*.pdb
11+
12+
# Generated by cargo mutants
13+
# Contains mutation testing data
14+
**/mutants.out*/
15+
16+
# RustRover
17+
.idea/

0 commit comments

Comments
 (0)