Add initial test case framework and progress tracker infrastructure #274
Workflow file for this run
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: Build | |
on: [push, pull_request_target] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- name: Checkout (Push) | |
if: github.event_name == 'push' | |
uses: actions/checkout@v3 | |
- name: Checkout (Pull Request) | |
if: github.event_name == 'pull_request_target' | |
uses: actions/checkout@v3 | |
with: | |
ref: "refs/pull/${{ github.event.number }}/merge" | |
- name: Install ninja | |
run: sudo apt install ninja-build | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Configure G++ version | |
run: | | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 10 | |
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 10 | |
sudo update-alternatives --set gcc "/usr/bin/gcc-13" | |
sudo update-alternatives --set g++ "/usr/bin/g++-13" | |
- name: Configure ninja | |
run: ./configure.py | |
- name: Compile | |
run: ninja | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Kinoko | |
path: | | |
out | |
samples | |
tools | |
format: | |
name: Format | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Download llvm | |
run: wget https://apt.llvm.org/llvm.sh | |
- name: Install clang-format | |
run: | | |
chmod u+x llvm.sh | |
sudo ./llvm.sh 16 | |
sudo apt install clang-format-16 | |
- name: Format Kinoko | |
run: | | |
dirs="include source" | |
find $dirs -regex '.*\.\(c\|h\|cc\|hh\)' | xargs clang-format-16 --dry-run -Werror | |
verify: | |
name: Verify | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Download artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: Kinoko | |
- name: Download dependencies | |
run: curl -L -o Runtime.tar.gz ${{ secrets.RUNTIME_DEPENDENCIES }} | |
- name: Extract dependencies | |
run: tar -xzf Runtime.tar.gz -C out | |
- name: Run Kinoko | |
run: cd out && chmod u+x ./kinoko && ./kinoko -s testCases.bin | |
- name: Upload output | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Kinoko output | |
path: out/results.txt | |
badge: | |
name: Compute Completion | |
runs-on: ubuntu-latest | |
needs: verify | |
if: github.ref == 'refs/heads/main' | |
permissions: | |
pages: write | |
id-token: write | |
steps: | |
- name: Download artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: Kinoko | |
- name: Download output binary | |
uses: actions/download-artifact@v3 | |
with: | |
name: Kinoko output | |
- name: Run python script | |
run: python3 tools/progress.py results.txt | |
- name: Upload Pages artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: out/website/ | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |