Skip to content

Build and Test

Build and Test #12

Workflow file for this run

# 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: Setup APE loader
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: |
export SHELL="/GH_ACTION_SH"
xmake -yvD
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: Artifact_Files
path: build/linux/x86_64
- name: Runs on ubuntu-latest
run: |
xmake run -ftrace
xmake run -strace
echo "test done"
# - 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