Build and Test #7
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
# Credits: wenxinyiyan(baidu's "chatgpt"), xmake devs | |
# Not finished yet | |
name: Build and Test | |
on: | |
pull_request: | |
types: [review_requested] | |
workflow_dispatch: | |
jobs: | |
build_and_test_on_ubuntu: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Setup xmake | |
uses: xmake-io/github-action-setup-xmake@v1 | |
with: | |
xmake-version: latest | |
- name: config APE | |
run: | | |
sudo wget -O /usr/bin/ape https://cosmo.zip/pub/cosmos/bin/ape-$(uname -m).elf | |
sudo chmod +x /usr/bin/ape | |
sudo sh -c "echo ':APE:M::MZqFpD::/usr/bin/ape:' >/proc/sys/fs/binfmt_misc/register" | |
sudo sh -c "echo ':APE-jart:M::jartsr::/usr/bin/ape:' >/proc/sys/fs/binfmt_misc/register" | |
- name: Build with xmake | |
run: xmake -yvD | |
- name: Runs on ubuntu-latest | |
run: xmake run | |
- name: Upload Build Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Artifact_Files | |
path: build/linux/x86_64 | |
# - name: Upload Build Artifacts to GitHub Release | |
# uses: svenstaro/[email protected] | |
# with: | |
# repo_token: ${{ secrets.GITHUB_TOKEN }} | |
# file: build/linux/x86_64/release/screenfetch-c.com | |
# asset_name: screenfetch-c.com | |
# tag: ${{ github.ref }} | |
# overwrite: true |