From c4d50ce74d62d09f085be62da56983646d37cb38 Mon Sep 17 00:00:00 2001 From: Joshua Raphael Date: Sun, 12 Jan 2025 16:13:50 -0700 Subject: [PATCH] feat: add ci to test compiling script --- .github/workflows/test.yaml | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..803314e --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,40 @@ +name: Test + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "**" ] + +permissions: + contents: write + pull-requests: write + +jobs: + compile: + name: compile + runs-on: ubuntu-latest + env: + RATOOLS_VERSION: v1.15.0 + RALIBRETRO_DIR: ~/Installs/RALibretro-x64 # same as Makefile + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Set ENV vars for github + run: echo "RATOOLS_DIR=~/Installs/RATools-${{env.RATOOLS_VERSION}}" >> $GITHUB_ENV # same as Makefile + + - name: Create folders + run: mkdir -p ${{env.RATOOLS_DIR}} && mkdir -p ${{env.RALIBRETRO_DIR}} + + - name: Install wine + run: sudo apt-get update && sudo apt-get install -y wine + + - name: Get RATools CLI + run: wget -O ${{env.RATOOLS_DIR}}/RATools-${{env.RATOOLS_VERSION}}.zip "https://github.com/Jamiras/RATools/releases/download/${{env.RATOOLS_VERSION}}/RATools-${{env.RATOOLS_VERSION}}.zip" + + - name: Unpack RATools + run: unzip ${{env.RATOOLS_DIR}}/RATools-${{env.RATOOLS_VERSION}}.zip -d ${{env.RATOOLS_DIR}} + + - name: Compile code + run: make compile \ No newline at end of file