-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic testing action for push and pr
Co-authored-by: Jim Huang <[email protected]>
- Loading branch information
1 parent
d80d590
commit 7545324
Showing
1 changed file
with
37 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,37 @@ | ||
name: Github Actions | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
host-x86: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
compiler: [gcc, clang] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install prerequisite | ||
run: | | ||
sudo apt-get update -q -y | ||
sudo apt-get install -q -y file | ||
sudo apt-get install -q -y build-essential | ||
- name: Build stage 1 artifact | ||
env: | ||
CC: ${{ matrix.compiler }} | ||
run: | | ||
make clean | ||
make slimcc | ||
shell: bash | ||
- name: Test stage 1 | ||
run: | | ||
make test || exit 1 | ||
shell: bash | ||
- name: Build stage 2 artifact | ||
run: | | ||
make stage2/slimcc | ||
shell: bash | ||
- name: Test stage 2 | ||
run: | | ||
make test-stage2 || exit 1 | ||
shell: bash |