From ca965d94eecfb349e0872be8e960dee5e9f67a11 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Fri, 29 Oct 2021 12:53:09 -0700 Subject: [PATCH] Add build scaffolding for GHA and issue templates for GH --- .github/ISSUE_TEMPLATE/bug_report.md | 8 +++ .github/ISSUE_TEMPLATE/config.yml | 5 ++ .github/ISSUE_TEMPLATE/feature_request.md | 8 +++ .github/workflows/build.yml | 75 +++++++++++++++++++++++ .github/workflows/release.yml | 34 ++++++++++ 5 files changed, 130 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..e5f096f5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,8 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: bug +assignees: '' + +--- diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..28b90188 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Help and support + url: https://github.com/zeux/meshoptimizer/discussions + about: Please use GitHub Discussions if you have questions or need help. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..83826c66 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,8 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: enhancement +assignees: '' + +--- diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..d1b914a7 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,75 @@ +name: build + +on: + push: + branches: + - 'master' + pull_request: + paths-ignore: + - 'docs/**' + - 'papers/**' + - 'rfcs/**' + - '*.md' + +jobs: + unix: + strategy: + matrix: + os: [ubuntu, macos] + name: ${{matrix.os}} + runs-on: ${{matrix.os}}-latest + steps: + - uses: actions/checkout@v1 + - name: make test + run: | + make -j2 config=sanitize test + - name: make test w/flags + run: | + make -j2 config=sanitize flags=true test + - name: make cli + run: | + make -j2 config=sanitize luau luau-analyze # match config with tests to improve build time + ./luau tests/conformance/assert.lua + ./luau-analyze tests/conformance/assert.lua + + windows: + runs-on: windows-latest + strategy: + matrix: + arch: [Win32, x64] + steps: + - uses: actions/checkout@v1 + - name: cmake configure + run: cmake . -A ${{matrix.arch}} + - name: cmake test + shell: bash # necessary for fail-fast + run: | + cmake --build . --target Luau.UnitTest Luau.Conformance --config Debug + Debug/Luau.UnitTest.exe + Debug/Luau.Conformance.exe + - name: cmake test w/flags + shell: bash # necessary for fail-fast + run: | + Debug/Luau.UnitTest.exe --fflags=true + Debug/Luau.Conformance.exe --fflags=true + - name: cmake cli + shell: bash # necessary for fail-fast + run: | + cmake --build . --target Luau.Repl.CLI Luau.Analyze.CLI --config Debug # match config with tests to improve build time + Debug/luau tests/conformance/assert.lua + Debug/luau-analyze tests/conformance/assert.lua + + coverage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: install + run: | + sudo apt install llvm + - name: make coverage + run: | + CXX=clang++-10 make -j2 config=coverage coverage + - uses: actions/upload-artifact@v2 + with: + name: coverage + path: coverage diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..8cfc27f6 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: release + +on: + push: + branches: + - 'master' + paths-ignore: + - 'docs/**' + - 'papers/**' + - 'rfcs/**' + +jobs: + build: + strategy: + matrix: + os: [ubuntu, macos, windows] + name: ${{matrix.os}} + runs-on: ${{matrix.os}}-latest + steps: + - uses: actions/checkout@v1 + - name: configure + run: cmake . -DCMAKE_BUILD_TYPE=Release + - name: build + run: cmake --build . --target Luau.Repl.CLI Luau.Analyze.CLI --config Release + - uses: actions/upload-artifact@v2 + if: matrix.os != 'windows' + with: + name: luau-${{matrix.os}} + path: luau* + - uses: actions/upload-artifact@v2 + if: matrix.os == 'windows' + with: + name: luau-${{matrix.os}} + path: Release\luau*.exe