feat: add trace_call to DebugRuntimeApi trait #246
Workflow file for this run
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
name: Build | |
on: | |
pull_request: | |
types: [opened, edited, synchronize] | |
jobs: | |
list-spec-versions: | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-latest | |
outputs: | |
spec_versions: ${{ steps.list-versions.outputs.spec_versions }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: List spec versions | |
id: list-versions | |
run: | | |
INTEGER_REGEX='^[0-9]+$' | |
cd tracing | |
for D in *; do | |
if [[ "${D}" =~ $INTEGER_REGEX ]] ; then | |
if [ -d "${D}" ]; then | |
LIST="$LIST, \"$D\"" | |
fi | |
fi | |
done | |
echo ::set-output name=spec_versions::[${LIST:2}] | |
echo "spec_versions: [${LIST:2}]" | |
####### Check files and formatting ####### | |
check-copyright: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Find un-copyrighted files | |
run: | | |
find . -name '*.rs' -exec grep -H -E -o -c Copyright {} \; | grep ':0' || true | |
FILECOUNT=$(find . -name '*.rs' -exec grep -H -E -o -c 'Copyright' {} \; | grep -c ':0' || true) | |
if [[ $FILECOUNT -eq 0 ]]; then | |
true | |
else | |
false | |
fi | |
check-editorconfig: | |
name: "Check editorconfig" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Setup editorconfig checker | |
run: | | |
ls /tmp/bin/ec-linux-amd64 || \ | |
cd /tmp && \ | |
wget https://github.com/editorconfig-checker/editorconfig-checker/releases/download/2.1.0/ec-linux-amd64.tar.gz && \ | |
tar xvf ec-linux-amd64.tar.gz && \ | |
chmod +x bin/ec-linux-amd64 | |
- name: Check files | |
run: /tmp/bin/ec-linux-amd64 | |
####### Check each tracing runtime independently ####### | |
check-tracing-runtime: | |
name: "Check tracing runtime" | |
if: github.event.pull_request.draft == false | |
runs-on: | |
labels: bare-metal | |
needs: ["list-spec-versions"] | |
strategy: | |
matrix: | |
spec_version: ${{ fromJson(needs.list-spec-versions.outputs.spec_versions) }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
filters: | | |
edited: | |
- 'tracing/${{ matrix.spec_version }}/**' | |
shared: | |
- 'tracing/shared' | |
- name: Format code with rustfmt | |
if: steps.filter.outputs.edited == 'true' || steps.filter.outputs.shared == 'true' | |
run: cd tracing/${{ matrix.spec_version }} && cargo fmt -- --check | |
#- name: Build and run tests | |
# if: steps.filter.outputs.edited == 'true' || steps.filter.outputs.shared == 'true' | |
# run: cd tracing/${{ matrix.spec_version }} && cargo test --release --all | |
- name: "Check wasm blob" | |
if: steps.filter.outputs.edited == 'true' || steps.filter.outputs.shared == 'true' | |
run: | | |
./scripts/check-tracing-runtime.sh ${{ matrix.spec_version }} |