Skip to content

Commit

Permalink
ci: Update cxx xmake example
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Aug 26, 2024
0 parents commit 6b77349
Show file tree
Hide file tree
Showing 29 changed files with 1,480 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# all start with .(dot), including directories and files
.*
CHANGELOG.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
compose.yml
LICENSE*
Makefile
README.md
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
max_line_length = 120
tab_width = 4
trim_trailing_whitespace = true

[Makefile]
indent_style = tab
44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

## Bug description

<!-- A clear and concise description of what the bug is. -->

- Would you like to work on a fix? [y/n]

## To Reproduce

Steps to reproduce the behavior:

1. ...
2. ...
3. ...
4. ...

<!-- Make sure you are able to reproduce the bug in the main branch, too. -->

## Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

## Screenshots

<!-- If applicable, add screenshots to help explain your problem. -->

## Environment

<!-- Please fill the following information. -->

- OS: [e.g. Ubuntu 20.04]
- example-cxx-xmake version: [e.g. 0.1.0]

## Additional context

<!-- Add any other context about the problem here. -->
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: true
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

## Motivations

<!--
If your feature request is related to a problem, please describe it.
-->

- Would you like to implement this feature? [y/n]

## Solution

<!-- Describe the solution you'd like. -->

## Alternatives

<!-- Describe any alternative solutions or features you've considered. -->

## Additional context

<!-- Add any other context or screenshots about the feature request here. -->
9 changes: 9 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!-- Please explain the changes you made -->

<!--
Please make sure:
- you have read the contributing guidelines:
https://github.com/x-pt/example-cxx-xmake/blob/main/docs/CONTRIBUTING.md
- you have updated the changelog (if needed):
https://github.com/x-pt/example-cxx-xmake/blob/main/CHANGELOG.md
-->
139 changes: 139 additions & 0 deletions .github/configs/labeler-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# Label issues related to bugs
bug:
- '*bug*'
- '*error*'
- '*fail*'
- '*failure*'
- '*issue*'
- '*crash*'
- '*problem*'
- '*fault*'
- '*defect*'
- '*break*'

# Label issues related to new features or enhancements
enhancement:
- '*enhancement*'
- '*feature*'
- '*improve*'
- '*upgrade*'
- '*add*'
- '*implement*'
- '*new feature*'
- '*new functionality*'

# Label issues related to documentation
documentation:
- '*doc*'
- '*docs*'
- '*readme*'
- '*wiki*'
- '*documentation*'
- '*guide*'
- '*manual*'
- '*instruction*'

# Label issues related to performance improvements
performance:
- '*performance*'
- '*speed*'
- '*optimize*'
- '*slow*'
- '*lag*'
- '*efficient*'
- '*latency*'
- '*throughput*'
- '*bottleneck*'

# Label issues related to security concerns
security:
- '*security*'
- '*vulnerability*'
- '*exploit*'
- '*attack*'
- '*secure*'
- '*encryption*'
- '*breach*'
- '*hack*'
- '*malware*'
- '*threat*'
- '*safety*'

# Label issues related to testing
test:
- '*test*'
- '*testing*'
- '*unittest*'
- '*integration*'
- '*e2e*'
- '*coverage*'
- '*test case*'
- '*regression*'
- '*qa*'
- '*validation*'

# Label issues related to user interface or design
design:
- '*ui*'
- '*ux*'
- '*interface*'
- '*design*'
- '*layout*'
- '*style*'
- '*aesthetic*'
- '*visual*'
- '*user experience*'
- '*user interface*'

# Label issues related to configuration or setup
configuration:
- '*config*'
- '*configuration*'
- '*setup*'
- '*install*'
- '*installation*'
- '*environment*'
- '*settings*'
- '*initialization*'
- '*deployment*'
- '*setup guide*'

# Label issues related to dependencies or third-party libraries
dependencies:
- '*dependency*'
- '*dependencies*'
- '*package*'
- '*library*'
- '*upgrade*'
- '*update*'
- '*module*'
- '*plugin*'
- '*third-party*'
- '*external*'
- '*vendor*'

# Label issues that are questions or require further discussion
question:
- '*question*'
- '*inquiry*'
- '*how to*'
- '*help*'
- '*support*'
- '*clarification*'
- '*query*'
- '*why*'
- '*what*'
- '*who*'
- '*where*'

# Label issues related to accessibility concerns
accessibility:
- '*accessibility*'
- '*a11y*'
- '*inclusive*'
- '*assistive*'
- '*screen reader*'
- '*accessible*'
- '*disability*'
- '*inclusive design*'
- '*equal access*'
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
# Check for updates every Monday
schedule:
interval: "weekly"
open-pull-requests-limit: 10
6 changes: 6 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
]
}
14 changes: 14 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: CD # Continuous Deployment or Delivery

on:
push:
# e.g. 1.0.0, v2.0.0, v0.1.0, v0.2.0-alpha, v0.3.0+build-71edf32
tags:
- '[v]?[0-9]+\.[0-9]+\.[0-9]+.*'

jobs:
dd:
name: Deploy or Delivery
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI # Continuous Integration

on:
push:
branches:
- main
pull_request:

jobs:
build-and-test:
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: latest

- name: Build
run: make build

- name: Test
run: make run
51 changes: 51 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build and Push Docker Image

on:
push:
tags:
- '^v[0-9]+\.[0-9]+\.[0-9]+.*$'

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and Export to Docker
uses: docker/build-push-action@v6
with:
context: .
load: true
tags: |
ghcr.io/x-pt/example-cxx-xmake:latest
ghcr.io/x-pt/example-cxx-xmake:${GITHUB_REF_NAME:1}
-
name: Test it before Push
run: |
docker run --rm ghcr.io/x-pt/example-cxx-xmake:latest
docker run --rm ghcr.io/x-pt/example-cxx-xmake:${GITHUB_REF_NAME:1}
-
name: Build and Push
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/x-pt/example-cxx-xmake:latest
ghcr.io/x-pt/example-cxx-xmake:${GITHUB_REF_NAME:1}
18 changes: 18 additions & 0 deletions .github/workflows/labeler-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: "Issue Labeler"
on:
issues:
types: [ opened, edited ]

permissions:
issues: write
contents: read

jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: github/[email protected]
with:
configuration-path: .github/configs/labeler-issues.yml
enable-versioned-regex: 0
include-title: 1
Loading

0 comments on commit 6b77349

Please sign in to comment.