Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed May 14, 2023
1 parent f1d1cc0 commit 7502c7d
Show file tree
Hide file tree
Showing 7 changed files with 108 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [mitsuhiko]
16 changes: 16 additions & 0 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Clippy

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy, rustfmt
- name: Run clippy
run: make lint
16 changes: 16 additions & 0 deletions .github/workflows/rustfmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Rustfmt

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy, rustfmt
- name: Run rustfmt
run: make format-check
44 changes: 44 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Tests

on: [push, pull_request]

jobs:
test-latest:
name: Test on Linux
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Check
run: make check
- name: Demo
run: ./demo.sh

test-latest:
name: Build on Windows
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Check
run: make check
- name: Demo
run: demo.bat

test-stable:
name: Build on 1.61.0
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.61.0
- name: Check
run: make check
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ edition = "2018"
license = "Apache-2.0"
repository = "https://github.com/mitsuhiko/self-replace"
keywords = ["self-update", "self-replace"]
rust-version = "1.61"

[dependencies]
tempfile = "3.5.0"
Expand Down
29 changes: 29 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.PHONY: all
all: test

.PHONY: build
build:
@cargo build --all

.PHONY: doc
doc:
@cargo doc

.PHONY: check
check:
@cargo check --all

.PHONY: format
format:
@rustup component add rustfmt 2> /dev/null
@cargo fmt --all

.PHONY: format-check
format-check:
@rustup component add rustfmt 2> /dev/null
@cargo fmt --all -- --check

.PHONY: lint
lint:
@rustup component add clippy 2> /dev/null
@cargo clippy --all -- -F clippy::dbg-macro -D warnings
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Crates.io](https://img.shields.io/crates/d/self-replace.svg)](https://crates.io/crates/self-replace)
[![License](https://img.shields.io/github/license/mitsuhiko/self-replace)](https://github.com/mitsuhiko/self-replace/blob/main/LICENSE)
[![rustc 1.41.0](https://img.shields.io/badge/rust-1.41%2B-orange.svg)](https://img.shields.io/badge/rust-1.41%2B-orange.svg)
[![rustc 1.61.0](https://img.shields.io/badge/rust-1.61%2B-orange.svg)](https://img.shields.io/badge/rust-1.61%2B-orange.svg)
[![Documentation](https://docs.rs/similar/badge.svg)](https://docs.rs/similar)

`self-replace` is a crate that allows binaries to replace themselves with newer
Expand Down

0 comments on commit 7502c7d

Please sign in to comment.