Fix typo in refmanual.tex #5
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 kerf1 | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- '*' | |
jobs: | |
build-macos: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Build kerf | |
run: | | |
cd $GITHUB_WORKSPACE/src/ | |
make all | |
mv kerf kerf-macos | |
- name: Install expect to test kerf | |
run: brew install expect | |
- name: Test kerf | |
run: | | |
cd $GITHUB_WORKSPACE/src/ | |
expect <<EOD | |
set timeout 60 | |
spawn ./kerf_test | |
expect { | |
"Passed" {} | |
"Failed" { exit 1 } | |
timeout { exit 1 } | |
} | |
expect { | |
"KeRF> " {send "quit\r"} | |
timeout { exit 1 } | |
} | |
expect { | |
"\[DEBUG\] OK: Done OK." {} | |
"\[DEBUG\] FAILED: Debug failure." { exit 1 } | |
timeout { exit 1 } | |
} | |
exit 0 | |
EOD | |
- name: Upload build | |
uses: actions/upload-artifact@v3 # All users can find the artifacts inside of the actions | |
with: | |
name: kerf-macOS | |
path: ${{ github.workspace }}/src/kerf-macos | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Docker Setup Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build kerf | |
run: | | |
cd $GITHUB_WORKSPACE/src/ | |
docker buildx build --output . . | |
tar xvf kerf1.tar | |
mv kerf kerf-linux | |
- name: Install expect to test kerf | |
run: sudo apt-get install -y expect | |
- name: Test kerf | |
run: | | |
cd $GITHUB_WORKSPACE/src | |
expect <<EOD | |
set timeout 60 | |
spawn ./kerf_test | |
expect { | |
"Passed" {} | |
"Failed" { exit 1 } | |
timeout { exit 1 } | |
} | |
expect { | |
"KeRF> " {send "quit\r"} | |
timeout { exit 1 } | |
} | |
expect { | |
"\[DEBUG\] OK: Done OK." {} | |
"\[DEBUG\] FAILED: Debug failure." { exit 1 } | |
timeout { exit 1 } | |
} | |
exit 0 | |
EOD | |
- name: Upload build | |
uses: actions/upload-artifact@v3 # All users can find the artifacts inside of the actions | |
with: | |
name: kerf-linux | |
path: ${{ github.workspace }}/src/kerf-linux | |
release: | |
runs-on: ubuntu-latest | |
if: always() | |
needs: [build-macos, build-linux] | |
steps: | |
- name: Download macOS artifact | |
uses: actions/download-artifact@v3 | |
continue-on-error: true | |
with: | |
name: kerf-macOS | |
path: output | |
- name: Download Linux artifact | |
uses: actions/download-artifact@v3 | |
continue-on-error: true | |
with: | |
name: kerf-linux | |
path: output | |
- name: Make binaries executable | |
continue-on-error: true | |
run: | | |
chmod +x output/kerf-macos; | |
chmod +x output/kerf-linux; | |
- name: Draft Release | |
continue-on-error: true | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') # Only DRAFT releases on tags, owner still has to write body and publish it | |
with: | |
draft: true | |
tag_name: ${{ steps.vars.outputs.tag_name }} | |
files: | | |
output/kerf-macos | |
output/kerf-linux | |
- name: Auto publish continuous pre-release | |
uses: marvinpinto/[email protected] | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "continuous" | |
prerelease: true | |
files: | | |
output/kerf-macos | |
output/kerf-linux |