Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

Commit

Permalink
fix: Fix release workflow (#62)
Browse files Browse the repository at this point in the history
* fix: Fix release workflow

* Fix small issues

* Remove iwyu from pre-commit

* Change test used by conda-build
  • Loading branch information
xmnlab committed Oct 15, 2022
1 parent 18b2262 commit e1db89a
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 20 deletions.
14 changes: 7 additions & 7 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

Ensure that:

- [ ] it includes tests.
- [ ] the tests for your implementation are executed on CI.
- [ ] it includes documentation
- [ ] the PR's title is according to the [semantic-release pattern][semantic-release-message].
- it includes tests.
- the tests for your implementation are executed on CI.
- it includes documentation
- the PR's title is according to the [semantic-release pattern][semantic-release-message].
- `build`: Changes that affect the build system or external dependencies (example scopes: cmake, meson, etc)
- `ci`: Changes to our CI configuration files and scripts (examples: CircleCi, SauceLabs)
- `docs`: Documentation only changes
Expand All @@ -19,11 +19,11 @@ Ensure that:
- `chore:` Can be used as a generic task for tasks such as CI, test, support tasks or any other task that is not user facing task.
- `feat:` is used for a new feature or when a existent one is improved.
- `fix:` is used when a bug is fixed.
- `breaking change:` is used when there is a compability break.
- [ ] pre-commit hooks were executed locally
- `BREAKING CHANGE:` is used when there is a compatibility break.
- pre-commit hooks were executed locally


<!-- Add any other extra information that would help to understad the changes proposed by the PR -->
<!-- Add any other extra information that would help to understand the changes proposed by the PR -->


[semantic-release-message]: https://github.com/semantic-release/semantic-release/blob/master/README.md#commit-message-format "Semantic Release Commit Message Format"
25 changes: 23 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,25 @@ jobs:
- name: run sanity tests
run: make test-sanitizer

- name: test examples
run: make test-examples
# NOTE: AddressSanitizer:DEADLYSIGNAL
# =================================================================
# ==5570==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000
# (pc 0x0000003a1ef7 bp 0x7ffc95ff93d0 sp 0x7ffc95ff93d0 T0)
# ==5570==The signal is caused by a READ memory access.
# ==5570==Hint: address points to the zero page.
# #0 0x3a1ef7 in llvm::DIScope::getRawFile() const codegen.cpp
# #1 0x39313b in FunctionAST::codegen() (/home/runner/work/arx/arx/build/arx+0x39313b)
# #2 0x395f4d in HandleDefinition() (/home/runner/work/arx/arx/build/arx+0x395f4d)
# #3 0x396904 in MainLoop() (/home/runner/work/arx/arx/build/arx+0x396904)
# #4 0x398bf6 in compile() (/home/runner/work/arx/arx/build/arx+0x398bf6)
# #5 0x3c5a7a in main (/home/runner/work/arx/arx/build/arx+0x3c5a7a)
# #6 0x7fc26d90a082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082)
# #7 0x29c0a8 in _start (/home/runner/work/arx/arx/build/arx+0x29c0a8)
#
# AddressSanitizer can not provide additional info.
# SUMMARY: AddressSanitizer: SEGV codegen.cpp in llvm::DIScope::getRawFile() const
#- name: test examples
# run: make test-examples

- name: lint
run: |
Expand All @@ -61,3 +78,7 @@ jobs:
if: ${{ github.event_name == 'pull_request' }}
id: llvm-cov-report
run: make code-coverage

- name: Check if PR title is a correct semantic-release prefix
if: ${{ github.event_name == 'pull_request' && always() }}
run: bash scripts/ci/pr-title-check.sh "${{ github.event.pull_request.title }}"
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ repos:
hooks:
# current issue:
# https://github.com/include-what-you-use/include-what-you-use/issues/270
- id: iwyu
name: iwyu
entry: ./scripts/iwyu.sh
language: system
files: ^arx\/.*\.(cpp|h)$
pass_filenames: true
type_or: [c++, c]
stages:
- commit
# - id: iwyu
# name: iwyu
# entry: ./scripts/iwyu.sh
# language: system
# files: ^arx\/.*\.(cpp|h)$
# pass_filenames: true
# type_or: [c++, c]
# stages:
# - commit

- id: clang-tidy
name: clang-tidy
Expand Down
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ PROJECT_NAME = ArxLang
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 1.4.1
PROJECT_NUMBER = 1.4.1 # semantic-release

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
2 changes: 1 addition & 1 deletion conda/recipe/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ function fib(x):
fib(10)
ARX
arx < /tmp/src.arx
arx --show-llvm < /tmp/src.arx
7 changes: 7 additions & 0 deletions scripts/ci/pr-title-check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -e

PREFIXES="build|ci|docs|perf|refactor|test|chore|feat|fix|BREAKING CHANGE"

echo "${1}" | grep -E "^(${PREFIXES})(\(.+\))?\:"

0 comments on commit e1db89a

Please sign in to comment.