This repository has been archived by the owner on Sep 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
69 additions
and
111 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -4,4 +4,4 @@ updates: | |
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
target-branch: "develop" | ||
target-branch: "main" |
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 @@ | ||
name: Auto merge | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
jobs: | ||
auto-merge: | ||
runs-on: ubuntu-latest | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- run: gh pr merge --merge --auto "$PR_URL" |
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,109 +1,83 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'develop' | ||
pull_request: | ||
types: [opened, reopened, review_requested] | ||
pull_request: {} | ||
merge_group: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
check-src: | ||
|
||
changed-files: | ||
name: changed-files | ||
runs-on: ubuntu-latest | ||
name: check if src files changed | ||
outputs: | ||
status: ${{ steps.changed-files.outputs.modified_files }} | ||
src: ${{ steps.changed-files-yaml.outputs.src_any_changed }} | ||
gpu: ${{ steps.changed-files-yaml.outputs.gpu_any_changed }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: tj-actions/changed-files@v42 | ||
id: changed-files | ||
- id: changed-files-yaml | ||
uses: tj-actions/changed-files@v44 | ||
with: | ||
files: | | ||
.github/actions/setup-build/action.yml | ||
.github/workflows/build.yml | ||
./**/*.comp | ||
./**/*.rs | ||
./*.toml | ||
files_yaml: | | ||
src: | ||
- '**/*.rs' | ||
- '**/Cargo.toml' | ||
gpu: | ||
- '**/*.rs' | ||
- '**/Cargo.toml' | ||
- '**/*.comp' | ||
build-src: | ||
needs: check-src | ||
name: build-src-${{ matrix.os }} | ||
test: | ||
needs: changed-files | ||
if: ${{ needs.changed-files.outputs.src == 'true' }} | ||
name: test-on-${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Rust cache | ||
if: needs.check-src.outputs.status | ||
uses: swatinem/rust-cache@v2 | ||
|
||
- name: Setup | ||
if: needs.check-src.outputs.status | ||
uses: ./.github/actions/setup-build | ||
- uses: ./.github/actions/setup-build | ||
with: | ||
os: ${{ matrix.os }} | ||
shaderc: false | ||
|
||
- name: Test src on ${{ matrix.os }} | ||
if: needs.check-src.outputs.status | ||
run: | | ||
- run: | | ||
cargo build --features "plotters python" | ||
cargo test --features "plotters python" | ||
shell: bash | ||
build-src-with-gpu: | ||
needs: check-src | ||
name: build-src-${{ matrix.os }}-with-gpu | ||
test-gpu: | ||
needs: changed-files | ||
if: ${{ needs.changed-files.outputs.gpu == 'true' }} | ||
name: test-on-${{ matrix.os }}-with-gpu | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Rust cache | ||
if: needs.check-src.outputs.status | ||
uses: swatinem/rust-cache@v2 | ||
|
||
- name: Setup | ||
if: needs.check-src.outputs.status | ||
uses: ./.github/actions/setup-build | ||
- uses: ./.github/actions/setup-build | ||
with: | ||
os: ${{ matrix.os }} | ||
shaderc: true | ||
|
||
- name: Test src on ${{ matrix.os }} | ||
if: needs.check-src.outputs.status | ||
run: | | ||
- run: | | ||
cargo build --features "plotters python gpu" | ||
cargo test --features "plotters python gpu" | ||
shell: bash | ||
lint-src: | ||
needs: check-src | ||
name: lint-src | ||
lint: | ||
needs: changed-files | ||
if: ${{ needs.changed-files.outputs.src == 'true' }} | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup | ||
if: needs.check-src.outputs.status | ||
uses: ./.github/actions/setup-build | ||
- uses: ./.github/actions/setup-build | ||
with: | ||
os: ubuntu-latest | ||
shaderc: true | ||
|
||
- name: Rust cache | ||
if: needs.check-src.outputs.status | ||
uses: swatinem/rust-cache@v2 | ||
|
||
- name: lint src | ||
if: needs.check-src.outputs.status | ||
run: | | ||
- run: | | ||
cargo clippy --features "plotters python" -- -D warnings | ||
cargo clippy --features "plotters python gpu" -- -D warnings | ||
cargo clippy --features "plotters python gpu" -- -D warnings |
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