From f2b32b32d04aa62d8fbc698fc7156e4b193d1c72 Mon Sep 17 00:00:00 2001 From: MonsterDruide1 <5958456@gmail.com> Date: Thu, 5 Oct 2023 22:38:02 +0200 Subject: [PATCH] Add workflow for verify --- .github/workflows/compile-check.yml | 44 +++++++++++++++++++++++++++++ README.md | 2 +- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/compile-check.yml diff --git a/.github/workflows/compile-check.yml b/.github/workflows/compile-check.yml new file mode 100644 index 000000000..690c9ae8c --- /dev/null +++ b/.github/workflows/compile-check.yml @@ -0,0 +1,44 @@ +name: Compile and verify functions +on: [push, pull_request] + +jobs: + compile_verify: + runs-on: ubuntu-latest + steps: + - name: Check out project + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Check for W-state functions + run: | + if grep -q ",W," "data/odyssey_functions.csv"; then + echo "Function list should not contain WIP-functions!" + echo "Found the following lines:" + grep ",W," "data/odyssey_functions.csv" + exit 1 + fi + - name: Set up dependencies + run: | + sudo apt install -y python3-pip ninja-build cmake ccache xdelta3 clang libssl-dev python-is-python3 curl libncurses5 + sudo pip3 install capstone colorama cxxfilt pyelftools ansiwrap watchdog python-Levenshtein toml + - name: Set up rust toolchain + uses: actions-rust-lang/setup-rust-toolchain@v1.5.0 + - name: Download main.nso from secret + env: + EXEFS_SHARED_PASS: ${{ secrets.EXEFS_SHARED_PASS }} + run: curl -u "github-odyssey:$EXEFS_SHARED_PASS" https://monsterdruide.one/secrets/smo-main.nso -O + - name: Run setup + run: tools/setup.py smo-main.nso + - name: Build project + run: tools/build.py + - name: Verify function states + run: | + var="$(tools/check)" + echo "before"; + echo $var; + echo "after"; + if [[ "$var" == "OK" ]]; then + exit 0 + else + exit 1 + fi diff --git a/README.md b/README.md index 6aa147e2d..b2c95fe18 100755 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ The instructions below assume that you are using Linux (native or WSL) or macOS. Ubuntu users can install those dependencies by running: ```shell -sudo apt install python3 ninja-build cmake ccache xdelta3 clang libssl-dev +sudo apt install python3 ninja-build cmake ccache xdelta3 clang libssl-dev libncurses5 ``` Additionally, you'll also need: