Skip to content

Build and Test

Build and Test #26

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: xmake -y
- name: Move the binary
run: xmake install -o build/binary
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: screenfetch-c_Artifact
path: build/binary
- name: Runs on ubuntu-latest
run: xmake run