From a7bc4abbae7e96bdad92c49a0547f41757e9c9af Mon Sep 17 00:00:00 2001 From: Persson-dev Date: Sun, 11 Aug 2024 14:56:09 +0200 Subject: [PATCH] add linux actions --- .gitea/workflows/linux.yml | 52 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .gitea/workflows/linux.yml diff --git a/.gitea/workflows/linux.yml b/.gitea/workflows/linux.yml new file mode 100644 index 0000000..f1a9b40 --- /dev/null +++ b/.gitea/workflows/linux.yml @@ -0,0 +1,52 @@ +name: Linux arm64 +run-name: Build And Test + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + Build: + runs-on: ubuntu-latest + env: + XMAKE_ROOT: y + steps: + - name: Check out repository code + uses: actions/checkout@v3 + + - name: Prepare Xmake + uses: xmake-io/github-action-setup-xmake@v1 + with: + xmake-version: latest + actions-cache-folder: '.xmake-cache' + actions-cache-key: 'ubuntu-xmake' + + - name: Packages List + run : | + xmake show -l packages | grep -E 'require|project' > ${{ github.workspace }}/packages.txt + cat ${{ github.workspace }}/packages.txt + + - name: Calc deps hash + uses: seepine/hash-files@v1 + id: get-hash + with: + patterns: 'packages.txt' + + - name: Packages cache + uses: actions/cache@v4 + with: + path: ~/.xmake/packages + key: ${{ runner.os }}-${{ steps.get-hash.outputs.hash }} + + - name: XMake config + run: xmake f --policies=package.install_only -p linux -y + + - name: Build + run: xmake + + - name: Test + run: xmake test \ No newline at end of file