ci: adapt to nix native runner
This commit is contained in:
parent
7aea0095e9
commit
7b1f3cca04
5 changed files with 6 additions and 90 deletions
18
.github/workflows/auto-approve-own-prs.yml
vendored
18
.github/workflows/auto-approve-own-prs.yml
vendored
|
|
@ -1,18 +0,0 @@
|
||||||
name: auto-approve
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches: [ master ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
auto-approve:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.event_name == 'pull_request' && github.event.pull_request.user.login == github.repository_owner
|
|
||||||
permissions:
|
|
||||||
pull-requests: write
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Auto-approve PR
|
|
||||||
run: gh pr review ${{ github.event.pull_request.number }} --approve
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
|
||||||
12
.github/workflows/check-spv.yml
vendored
12
.github/workflows/check-spv.yml
vendored
|
|
@ -12,18 +12,10 @@ env:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-spv:
|
check-spv:
|
||||||
runs-on: ubuntu-latest
|
runs-on: native
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Show env
|
|
||||||
run: |
|
|
||||||
uname -a
|
|
||||||
ldd --version
|
|
||||||
- name: Install
|
|
||||||
run: |
|
|
||||||
curl https://sh.rustup.rs -sSf | sh -s -- -y
|
|
||||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
|
||||||
- name: Check
|
- name: Check
|
||||||
run: |
|
run: |
|
||||||
cargo run --manifest-path compile-shaders/Cargo.toml -p compile-shaders-core
|
nix develop . --command cargo run --manifest-path compile-shaders/Cargo.toml -p compile-shaders-core
|
||||||
git diff --exit-code
|
git diff --exit-code
|
||||||
|
|
|
||||||
40
.github/workflows/publish-page.yml
vendored
40
.github/workflows/publish-page.yml
vendored
|
|
@ -1,40 +0,0 @@
|
||||||
name: publish-page
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ master ]
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
- name: Install mdbook
|
|
||||||
run: |
|
|
||||||
VERSION=0.5.2
|
|
||||||
URL=https://github.com/rust-lang/mdBook/releases/download/v${VERSION}/mdbook-v${VERSION}-x86_64-unknown-linux-gnu.tar.gz
|
|
||||||
mkdir mdbook
|
|
||||||
curl -sSL $URL | tar -xz --directory=mdbook
|
|
||||||
- name: Create root
|
|
||||||
run: |
|
|
||||||
mkdir page
|
|
||||||
- name: Build book
|
|
||||||
run: |
|
|
||||||
cd book
|
|
||||||
../mdbook/mdbook build
|
|
||||||
mv book ../page
|
|
||||||
- uses: actions/upload-pages-artifact@v4
|
|
||||||
with:
|
|
||||||
path: page
|
|
||||||
publish:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: build
|
|
||||||
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
|
||||||
permissions:
|
|
||||||
pages: write
|
|
||||||
id-token: write
|
|
||||||
steps:
|
|
||||||
- uses: actions/deploy-pages@v4
|
|
||||||
13
.github/workflows/rustfmt.yml
vendored
13
.github/workflows/rustfmt.yml
vendored
|
|
@ -12,17 +12,8 @@ env:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
rustfmt:
|
rustfmt:
|
||||||
runs-on: ubuntu-latest
|
runs-on: native
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Show env
|
|
||||||
run: |
|
|
||||||
uname -a
|
|
||||||
ldd --version
|
|
||||||
- name: Install
|
|
||||||
run: |
|
|
||||||
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly
|
|
||||||
rustup toolchain install nightly --allow-downgrade -c rustfmt
|
|
||||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
|
||||||
- name: Check
|
- name: Check
|
||||||
run: cargo +nightly fmt -- --check
|
run: nix develop .#dev --command cargo fmt -- --check
|
||||||
|
|
|
||||||
13
.github/workflows/toml-spec.yml
vendored
13
.github/workflows/toml-spec.yml
vendored
|
|
@ -12,20 +12,11 @@ env:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
toml-spec:
|
toml-spec:
|
||||||
runs-on: ubuntu-latest
|
runs-on: native
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Show env
|
|
||||||
run: |
|
|
||||||
uname -a
|
|
||||||
ldd --version
|
|
||||||
- name: Install
|
|
||||||
run: |
|
|
||||||
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly
|
|
||||||
rustup toolchain install nightly --allow-downgrade -c rustfmt
|
|
||||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
|
||||||
- name: Check
|
- name: Check
|
||||||
run: |
|
run: |
|
||||||
cd toml-spec
|
cd toml-spec
|
||||||
cargo run
|
nix develop .. --command cargo run
|
||||||
git diff --exit-code
|
git diff --exit-code
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue