mirror of
https://github.com/Magnus167/rustframe.git
synced 2025-08-20 14:30:01 +00:00
Merge 5f1bb68723b8a131fad5e832f25f9d9cc32f96a9 into ddcc539076f3b78bd9c41afc55e45bcb51ba7bc0
This commit is contained in:
commit
d6fe76f014
12
.github/actions/runner-fallback/action.yml
vendored
12
.github/actions/runner-fallback/action.yml
vendored
@ -40,7 +40,17 @@ runs:
|
||||
runners=$(curl -s -H "Authorization: Bearer $TOKEN" \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
"https://api.github.com/repos/$repo/actions/runners?per_page=100")
|
||||
# Split wanted labels
|
||||
|
||||
# Debug: Print runners content
|
||||
echo "Runners response: $runners"
|
||||
|
||||
# Check if runners is null or empty
|
||||
if [ -z "$runners" ] || [ "$runners" = "null" ]; then
|
||||
echo "❌ Error: Unable to fetch runners or no runners found." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Process runners only if valid
|
||||
IFS=',' read -ra WANT <<<"$PRIMARY"
|
||||
online_found=0
|
||||
while read -r row; do
|
||||
|
32
.github/workflows/docs-and-testcov.yml
vendored
32
.github/workflows/docs-and-testcov.yml
vendored
@ -6,9 +6,9 @@ concurrency:
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
# pull_request:
|
||||
# branches: [main]
|
||||
branches: [main, update_docs_workflow]
|
||||
# pull_request:
|
||||
# branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
@ -27,7 +27,7 @@ jobs:
|
||||
- id: choose
|
||||
uses: ./.github/actions/runner-fallback
|
||||
with:
|
||||
primary-runner: "self-hosted,ubuntu-latest"
|
||||
primary-runner: "self-hosted"
|
||||
fallback-runner: "ubuntu-latest"
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@ -94,21 +94,25 @@ jobs:
|
||||
|
||||
- name: Copy files to output directory
|
||||
run: |
|
||||
# mkdir docs
|
||||
mkdir -p target/doc/docs
|
||||
cp -r target/doc/rustframe/* target/doc/docs/
|
||||
|
||||
mkdir output
|
||||
cp tarpaulin-report.html target/doc/rustframe/
|
||||
cp tarpaulin-report.json target/doc/rustframe/
|
||||
cp tarpaulin-badge.json target/doc/rustframe/
|
||||
cp last-commit-date.json target/doc/rustframe/
|
||||
mkdir -p target/doc/rustframe/.github
|
||||
cp .github/rustframe_logo.png target/doc/rustframe/.github/
|
||||
echo "<meta http-equiv=\"refresh\" content=\"0; url=rustframe\">" > target/doc/index.html
|
||||
cp tarpaulin-report.html target/doc/docs/
|
||||
cp tarpaulin-report.json target/doc/docs/
|
||||
cp tarpaulin-badge.json target/doc/docs/
|
||||
cp last-commit-date.json target/doc/docs/
|
||||
mkdir -p target/doc/docs/.github
|
||||
cp .github/rustframe_logo.png target/doc/docs/.github/
|
||||
echo "<meta http-equiv=\"refresh\" content=\"0; url=docs\">" > target/doc/index.html
|
||||
|
||||
- name: Upload Pages artifact
|
||||
if: github.event_name == 'push'
|
||||
# if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: target/doc/
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
if: github.event_name == 'push'
|
||||
uses: actions/deploy-pages@v4
|
||||
# if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||
uses: actions/deploy-pages@v4
|
16
.github/workflows/run-benchmarks.yml
vendored
16
.github/workflows/run-benchmarks.yml
vendored
@ -7,8 +7,22 @@ on:
|
||||
# - main
|
||||
|
||||
jobs:
|
||||
run-benchmarks:
|
||||
pick-runner:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
runner: ${{ steps.choose.outputs.use-runner }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- id: choose
|
||||
uses: ./.github/actions/runner-fallback
|
||||
with:
|
||||
primary-runner: "self-hosted"
|
||||
fallback-runner: "ubuntu-latest"
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
run-benchmarks:
|
||||
needs: pick-runner
|
||||
runs-on: ${{ fromJson(needs.pick-runner.outputs.runner) }}
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
|
2
.github/workflows/run-unit-tests.yml
vendored
2
.github/workflows/run-unit-tests.yml
vendored
@ -21,7 +21,7 @@ jobs:
|
||||
- id: choose
|
||||
uses: ./.github/actions/runner-fallback
|
||||
with:
|
||||
primary-runner: "self-hosted,ubuntu-latest"
|
||||
primary-runner: "self-hosted"
|
||||
fallback-runner: "ubuntu-latest"
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<!-- [](https://github.com/Magnus167/rustframe) -->
|
||||
[](https://codecov.io/gh/Magnus167/rustframe)
|
||||
[](https://magnus167.github.io/rustframe/rustframe/tarpaulin-report.html)
|
||||
[](https://magnus167.github.io/rustframe/docs/tarpaulin-report.html)
|
||||
|
||||
---
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user