chore: migrate CI to Forgejo
All checks were successful
Build and test / Clippy (pull_request) Successful in 44s
Build and test / Tests (pull_request) Successful in 55s
Build and test / Build AMD64 (pull_request) Successful in 56s
Checking yaml / Run yamllint (pull_request) Successful in 5s
Build and test / Generate Documentation (pull_request) Successful in 51s
Checking Renovate configuration / validate (pull_request) Successful in 56s
All checks were successful
Build and test / Clippy (pull_request) Successful in 44s
Build and test / Tests (pull_request) Successful in 55s
Build and test / Build AMD64 (pull_request) Successful in 56s
Checking yaml / Run yamllint (pull_request) Successful in 5s
Build and test / Generate Documentation (pull_request) Successful in 51s
Checking Renovate configuration / validate (pull_request) Successful in 56s
This commit is contained in:
parent
14165f0137
commit
f528650fb3
6 changed files with 219 additions and 62 deletions
15
.forgejo/workflows/renovate-config-validation.yaml
Normal file
15
.forgejo/workflows/renovate-config-validation.yaml
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
name: Checking Renovate configuration
|
||||
|
||||
on: # yamllint disable-line rule:truthy
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
- name: Validate Renovate configuration
|
||||
uses: suzuki-shunsuke/github-action-renovate-config-validator@v1.1.1
|
||||
...
|
149
.forgejo/workflows/rust.yml
Normal file
149
.forgejo/workflows/rust.yml
Normal file
|
@ -0,0 +1,149 @@
|
|||
---
|
||||
# yamllint disable rule:line-length
|
||||
|
||||
name: Build and test
|
||||
|
||||
on: # yamllint disable-line rule:truthy
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
name: Tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Cache Rust toolchain and dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cargo
|
||||
~/.rustup
|
||||
target
|
||||
key: ${{ runner.os }}-rustup-cargo-test-${{ hashFiles('rust-toolchain.toml', 'rust-toolchain') || 'stable' }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-rustup-cargo-test-
|
||||
- name: Install Rust toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
components: rustfmt
|
||||
override: true
|
||||
- name: Show versions
|
||||
run: |
|
||||
rustc --version
|
||||
cargo --version
|
||||
- name: Check formatting
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: fmt
|
||||
args: --check
|
||||
- name: Run tests
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
clippy:
|
||||
name: Clippy
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Cache Rust toolchain and dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cargo
|
||||
~/.rustup
|
||||
target
|
||||
key: ${{ runner.os }}-rustup-cargo-clippy-${{ hashFiles('rust-toolchain.toml', 'rust-toolchain') || 'stable' }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-rustup-cargo-clippy-
|
||||
- name: Install Rust toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
components: clippy
|
||||
override: true
|
||||
- name: Show versions
|
||||
run: |
|
||||
rustc --version
|
||||
cargo --version
|
||||
- name: Clippy check
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: clippy
|
||||
args: -- -D warnings
|
||||
|
||||
build-amd64:
|
||||
name: Build AMD64
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Cache Rust toolchain and dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cargo
|
||||
~/.rustup
|
||||
target
|
||||
key: ${{ runner.os }}-rustup-cargo-build-${{ hashFiles('rust-toolchain.toml', 'rust-toolchain') || 'stable' }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-rustup-cargo-build-
|
||||
- name: Install Rust toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
- name: Show versions
|
||||
run: |
|
||||
rustc --version
|
||||
cargo --version
|
||||
- name: Build release binary
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: build
|
||||
args: --release --all-features
|
||||
- name: Upload binary artifact
|
||||
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
||||
with:
|
||||
name: immich-tools-linux-amd64
|
||||
path: target/release/immich-tools
|
||||
|
||||
rustdoc:
|
||||
name: Generate Documentation
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Cache Rust toolchain and dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cargo
|
||||
~/.rustup
|
||||
target
|
||||
key: ${{ runner.os }}-rustup-cargo-doc-${{ hashFiles('rust-toolchain.toml', 'rust-toolchain') || 'stable' }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-rustup-cargo-doc-
|
||||
- name: Install Rust toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
- name: Show versions
|
||||
run: |
|
||||
rustc --version
|
||||
cargo --version
|
||||
- name: Generate documentation
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: doc
|
||||
- name: Compress documentation
|
||||
run: tar -czf rustdoc.tar.gz -C target doc
|
||||
- name: Upload documentation artifact
|
||||
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
||||
with:
|
||||
name: rustdoc
|
||||
path: rustdoc.tar.gz
|
||||
...
|
18
.forgejo/workflows/yamllint.yaml
Normal file
18
.forgejo/workflows/yamllint.yaml
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
name: Checking yaml
|
||||
|
||||
on: # yamllint disable-line rule:truthy
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
yamllint:
|
||||
name: Run yamllint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
- name: Run YAML linter
|
||||
uses: bewuethr/yamllint-action@v1
|
||||
with:
|
||||
config-file: .yamllint.yaml
|
||||
...
|
|
@ -1,62 +0,0 @@
|
|||
---
|
||||
stages:
|
||||
- test
|
||||
- build
|
||||
- publish
|
||||
|
||||
|
||||
default:
|
||||
|
||||
tests:
|
||||
stage: test
|
||||
image: rust
|
||||
before_script:
|
||||
- rustc --version
|
||||
- cargo --version
|
||||
- rustup component add rustfmt
|
||||
script:
|
||||
- cargo fmt --check
|
||||
- cargo test
|
||||
|
||||
build:amd64:
|
||||
stage: build
|
||||
image: rust
|
||||
before_script:
|
||||
- rustc --version
|
||||
- cargo --version
|
||||
script:
|
||||
- cargo build --release
|
||||
artifacts:
|
||||
paths:
|
||||
- target/release/immich-tools
|
||||
|
||||
rustdoc:
|
||||
stage: build
|
||||
image: rust
|
||||
before_script:
|
||||
- rustc --version
|
||||
- cargo --version
|
||||
script:
|
||||
- cargo doc
|
||||
artifacts:
|
||||
paths:
|
||||
- target/doc
|
||||
|
||||
pages:
|
||||
stage: publish
|
||||
image: alpine
|
||||
dependencies:
|
||||
- build:amd64
|
||||
- rustdoc
|
||||
script:
|
||||
- mkdir -p public
|
||||
- mv target/doc public/doc
|
||||
- mv target/release/immich-tools public/immich-tools-amd64
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
only:
|
||||
- main
|
||||
...
|
||||
|
||||
|
30
.yamllint.yaml
Normal file
30
.yamllint.yaml
Normal file
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
ignore: |
|
||||
.platformio
|
||||
secrets.yaml
|
||||
|
||||
rules:
|
||||
braces: enable
|
||||
brackets: enable
|
||||
colons: enable
|
||||
commas: enable
|
||||
comments: enable
|
||||
comments-indentation: enable
|
||||
document-end: enable
|
||||
document-start: enable
|
||||
empty-lines:
|
||||
max: 1
|
||||
empty-values: disable
|
||||
hyphens: enable
|
||||
indentation: enable
|
||||
key-duplicates: enable
|
||||
key-ordering: disable
|
||||
line-length:
|
||||
max: 100
|
||||
new-line-at-end-of-file: enable
|
||||
new-lines: enable
|
||||
octal-values: enable
|
||||
quoted-strings: disable
|
||||
trailing-spaces: enable
|
||||
truthy: enable
|
||||
...
|
7
renovate.json
Normal file
7
renovate.json
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"assignees": ["kernald"],
|
||||
"extends": [
|
||||
"config:recommended"
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue