-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #467 from stm32-rs/merge-queue
merge queue
- Loading branch information
Showing
12 changed files
with
116 additions
and
40 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
on: | ||
pull_request_target: | ||
|
||
name: Changelog check | ||
|
||
jobs: | ||
changelog: | ||
name: Changelog check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
|
||
- name: Changelog updated | ||
uses: Zomzog/[email protected] | ||
with: | ||
fileName: CHANGELOG.md | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
on: [push, pull_request] | ||
on: | ||
push: | ||
branches: master | ||
pull_request: | ||
|
||
name: Clippy check | ||
jobs: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
on: [push, pull_request] | ||
on: | ||
push: | ||
branches: master | ||
pull_request: | ||
merge_group: | ||
|
||
name: Code formatting check | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#! /usr/bin/env python3 | ||
|
||
import json | ||
import subprocess | ||
import sys | ||
|
||
|
||
def run_inner(args): | ||
print("Running `{}`...".format(" ".join(args))) | ||
ret = subprocess.call(args) == 0 | ||
print("") | ||
return ret | ||
|
||
|
||
def run(mcu, cargo_cmd): | ||
if mcu == "": | ||
return run_inner(cargo_cmd) | ||
else: | ||
return run_inner(cargo_cmd + ["--features={}".format(mcu)]) | ||
|
||
|
||
def main(): | ||
cargo_meta = json.loads( | ||
subprocess.check_output("cargo metadata --no-deps --format-version=1", | ||
shell=True, | ||
universal_newlines=True) | ||
) | ||
|
||
crate_info = cargo_meta["packages"][0] | ||
|
||
features = ["{},rtic,high".format(x) | ||
for x in crate_info["features"].keys() | ||
if x.startswith("stm32f1")] | ||
|
||
if 'size_check' in sys.argv: | ||
cargo_cmd = ['cargo', 'build', '--release'] | ||
else: | ||
cargo_cmd = ['cargo', 'check'] | ||
|
||
if '--examples' in sys.argv: | ||
cargo_cmd += ['--examples'] | ||
|
||
if not all(map(lambda f: run(f, cargo_cmd), | ||
features)): | ||
sys.exit(-1) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() | ||
|