-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JIRA: CI-334
- Loading branch information
Showing
2 changed files
with
71 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# vim:sw=2:ts=2 | ||
# copy of ci-submodule.yml - but building only host tools on host-generic-pc TARGET | ||
name: ci | ||
|
||
# on events | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- 'feature/*' | ||
pull_request: | ||
branches: | ||
- master | ||
- 'feature/*' | ||
|
||
jobs: | ||
build: | ||
name: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
# step 1 : checkout submodule | ||
- name: Checkout submodule | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
# step 2: checkout phoenix-rtos-project repository code in .buildroot and symlink submodule name to `workspace` | ||
# that way workspace file paths will match submodule paths - making problem matchers work | ||
# BUILD_DIRECTORY - absolute path to phoenix-rtos-project | ||
# CI_CUSTOM_BUILDROOT - relative path to phoenix-rtos-project (from GH Actions workspace) | ||
- name: Checkout phoenix-rtos-project | ||
# we need to use relative paths here so they would work in docker env | ||
run: | | ||
mkdir .buildroot && cd .buildroot | ||
git clone https://github.com/phoenix-rtos/phoenix-rtos-project --recurse-submodules | ||
cd phoenix-rtos-project | ||
echo "BUILD_DIRECTORY=$(pwd)" >> $GITHUB_ENV | ||
echo "CI_CUSTOM_BUILDROOT=.buildroot/phoenix-rtos-project" >> $GITHUB_ENV | ||
git log -1 --pretty=oneline | ||
git submodule | ||
rm -rf ${{ github.event.repository.name }} | ||
ln -s ../.. ${{ github.event.repository.name }} | ||
# attach GCC problem matcher - will pin problems to files only in current submodule | ||
- uses: ammaraskar/gcc-problem-matcher@master | ||
|
||
# step 3: use our custom action to build the project | ||
- name: Build | ||
id: build | ||
uses: ./.buildroot/phoenix-rtos-project/.github/actions/phoenix-build # BUILD_DIRECTORY value, but we can't use templates here | ||
with: | ||
target: 'host-generic-pc' | ||
params: host | ||
buildroot: ${{env.CI_CUSTOM_BUILDROOT}} |
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,17 @@ | ||
# vim:sw=2:ts=2 | ||
name: lint | ||
|
||
# on events | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- 'feature/*' | ||
pull_request: | ||
branches: | ||
- master | ||
- 'feature/*' | ||
|
||
jobs: | ||
call-lint: | ||
uses: phoenix-rtos/phoenix-rtos-project/.github/workflows/lint.yml@master |