From 90c47b609c993316666e03212c34b62b9a79ae06 Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 1 Jul 2025 18:01:35 -0700 Subject: [PATCH 1/3] Add copilot environment configuration. --- .github/workflows/copilot-setup-steps.yml | 36 +++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/copilot-setup-steps.yml diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml new file mode 100644 index 00000000000..6fdf5e77ba7 --- /dev/null +++ b/.github/workflows/copilot-setup-steps.yml @@ -0,0 +1,36 @@ +name: "Copilot Setup Steps" + +# Automatically run the setup steps when they are changed to allow for easy validation, and +# allow manual testing through the repository's "Actions" tab +on: + workflow_dispatch: + push: + paths: + - .github/workflows/copilot-setup-steps.yml + pull_request: + paths: + - .github/workflows/copilot-setup-steps.yml + +jobs: + copilot-setup-steps: + runs-on: ubuntu-latest + + permissions: + contents: read + pull-requests: write + checks: write + + steps: + - uses: actions/checkout@v4 + with: + submodules: "recursive" + fetch-depth: "2" + - name: setup environment + run: | + sudo apt-get update + sudo apt-get install -y libx11-dev + - name: Build + run: | + cmake --preset default --fresh + cmake --workflow --preset debug + \ No newline at end of file From 63b4a5dae6338de89d5eef9579e3f6cd02eefa54 Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 1 Jul 2025 18:36:44 -0700 Subject: [PATCH 2/3] Add instructions. --- .github/copilot-instructions.md | 22 ++++++++++++++++++++++ .github/workflows/copilot-setup-steps.yml | 6 ++---- 2 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 .github/copilot-instructions.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 00000000000..17523888c7f --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,22 @@ +## Configure CMake and Build + +To configure cmake, run `cmake --preset default --fresh`. +To build, run `cmake --workflow --preset debug` or `cmake --workflow --preset release`. + +## Formatting + +Your PR needs to be formatted according to our coding style. +Run `./extras/formatting.sh` script to format your changes before creating a PR. + +## Labeling your PR + +All PRs needs to be labeled as either "pr: non-breaking" or "pr: breaking". +Label your PR as "pr: breaking" if you are introducing public API changes that breaks ABI compabibility, +or you are introducing changes to the Slang language that will cause the compiler to error out on existing Slang code. +It is rare for a PR to be a breaking change. + +## Testing + +Your PR should include a regression test for the bug you are fixing. +Normally, these tests present as a `.slang` file under `tests/` directory. +You will need to run your test with `slang-test tests/path/to/your-new-test.slang`. \ No newline at end of file diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index 6fdf5e77ba7..c7983c469cd 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -25,12 +25,10 @@ jobs: with: submodules: "recursive" fetch-depth: "2" + - uses: ./.github/actions/format-setup - name: setup environment run: | sudo apt-get update sudo apt-get install -y libx11-dev - - name: Build - run: | - cmake --preset default --fresh - cmake --workflow --preset debug + \ No newline at end of file From 47343b5a34cd8feb9ba54def7655567413edd990 Mon Sep 17 00:00:00 2001 From: slangbot <186143334+slangbot@users.noreply.github.com> Date: Wed, 2 Jul 2025 01:38:40 +0000 Subject: [PATCH 3/3] format code --- .github/workflows/copilot-setup-steps.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index c7983c469cd..fe47a77788c 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -23,12 +23,10 @@ jobs: steps: - uses: actions/checkout@v4 with: - submodules: "recursive" - fetch-depth: "2" + submodules: "recursive" + fetch-depth: "2" - uses: ./.github/actions/format-setup - name: setup environment run: | - sudo apt-get update - sudo apt-get install -y libx11-dev - - \ No newline at end of file + sudo apt-get update + sudo apt-get install -y libx11-dev