mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-25 12:28:35 +00:00
Gentle nudge towards a MSRV [#402]
Run CI against 1.48 as well as stable and beta Replace use of `bool_to_option` as it's in xtask, and would otherwise bump ~required version to 1.50
This commit is contained in:
parent
794ece8956
commit
13580e0407
28
.github/workflows/ci.yml
vendored
28
.github/workflows/ci.yml
vendored
@ -11,20 +11,21 @@ jobs:
|
|||||||
clippy:
|
clippy:
|
||||||
name: Run linter
|
name: Run linter
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
rust: ["1.48"]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
RUSTFLAGS: -D warnings
|
RUSTFLAGS: -D warnings
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Checkout submodules
|
with: {submodules: true}
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
|
|
||||||
git submodule sync --recursive
|
|
||||||
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
|
||||||
- uses: hecrj/setup-rust-action@v1
|
- uses: hecrj/setup-rust-action@v1
|
||||||
with:
|
with:
|
||||||
components: clippy
|
components: clippy
|
||||||
|
rust-version: ${{ matrix.rust }}
|
||||||
- name: Cache cargo directories
|
- name: Cache cargo directories
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
@ -55,19 +56,19 @@ jobs:
|
|||||||
rustfmt:
|
rustfmt:
|
||||||
name: Check rustfmt
|
name: Check rustfmt
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
rust: ["1.48"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
# TODO: why not `with: {submodules: true}`
|
with: {submodules: true}
|
||||||
- name: Checkout submodules
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
|
|
||||||
git submodule sync --recursive
|
|
||||||
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
|
||||||
- uses: hecrj/setup-rust-action@v1
|
- uses: hecrj/setup-rust-action@v1
|
||||||
with:
|
with:
|
||||||
components: rustfmt
|
components: rustfmt
|
||||||
|
rust-version: ${{ matrix.rust }}
|
||||||
- run: cargo fmt --all -- --check
|
- run: cargo fmt --all -- --check
|
||||||
|
|
||||||
test:
|
test:
|
||||||
@ -82,6 +83,7 @@ jobs:
|
|||||||
rust:
|
rust:
|
||||||
- stable
|
- stable
|
||||||
- beta
|
- beta
|
||||||
|
- "1.48"
|
||||||
os:
|
os:
|
||||||
- ubuntu-latest
|
- ubuntu-latest
|
||||||
- macos-latest
|
- macos-latest
|
||||||
|
|||||||
@ -188,7 +188,11 @@ fn git_submodule_update_init_recursive() -> Result<()> {
|
|||||||
static NO_PROGRESS_FLAG: AtomicBool = AtomicBool::new(false);
|
static NO_PROGRESS_FLAG: AtomicBool = AtomicBool::new(false);
|
||||||
|
|
||||||
fn do_git_smu(with_progress_flag: bool) -> Result<()> {
|
fn do_git_smu(with_progress_flag: bool) -> Result<()> {
|
||||||
let flag = with_progress_flag.then(|| "--progress");
|
let flag = if with_progress_flag {
|
||||||
|
Some("--progress")
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
};
|
||||||
xshell::cmd!("git submodule update --init --recursive {flag...}")
|
xshell::cmd!("git submodule update --init --recursive {flag...}")
|
||||||
.echo_cmd(crate::verbose())
|
.echo_cmd(crate::verbose())
|
||||||
.run()?;
|
.run()?;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user