Merge pull request #34 from jimmylu890303/Implement-virtio-net #18
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
name: CI | |
on: [push, pull_request] | |
jobs: | |
detect-code-related-file-changes: | |
runs-on: ubuntu-22.04 | |
outputs: | |
has_code_related_changes: ${{ steps.set_has_code_related_changes.outputs.has_code_related_changes }} | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Test changed files | |
id: changed-files | |
uses: tj-actions/changed-files@v44 | |
with: | |
files: | | |
.ci/** | |
mk/** | |
src/** | |
target/** | |
.clang-format | |
Makefile | |
- name: Set has_code_related_changes | |
id: set_has_code_related_changes | |
run: | | |
if [[ ${{ steps.changed-files.outputs.any_changed }} == true ]]; then | |
echo "has_code_related_changes=true" >> $GITHUB_OUTPUT | |
else | |
echo "has_code_related_changes=false" >> $GITHUB_OUTPUT | |
fi | |
host-x64: | |
needs: [detect-code-related-file-changes] | |
if: needs.detect-code-related-file-changes.outputs.has_code_related_changes == 'true' | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: default build | |
run: make | |
coding-style: | |
needs: [detect-code-related-file-changes] | |
if: needs.detect-code-related-file-changes.outputs.has_code_related_changes == 'true' | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: coding convention | |
run: | | |
sudo apt-get install -q -y clang-format-12 | |
.ci/check-newline.sh | |
.ci/check-format.sh | |
shell: bash |