diff --git a/.github/workflows/dev-nightly-tests.yml b/.github/workflows/dev-nightly-tests.yml new file mode 100644 index 00000000..d5e2b895 --- /dev/null +++ b/.github/workflows/dev-nightly-tests.yml @@ -0,0 +1,74 @@ +# Periodic tests of latest dev branch +# +# This is for early detection of breaking changes. +# + +name: dev nightly tests + +# Controls when the workflow will run +on: + schedule: + - cron: "0 5 * * *" # every day 5AM + + workflow_dispatch: + +jobs: + test: + name: Test ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-2022] + + steps: + - name: Checkout dev Branch + uses: actions/checkout@v4 + with: + ref: dev + + - name: Install build tools (Linux) + if: runner.os == 'Linux' + shell: bash + run: sudo apt-get update && sudo apt-get install -y automake libtool autogen mcpp + + - name: Install build tools (Windows) + if: runner.os == 'Windows' + run: choco install mcpp -y + shell: bash + + - name: Install Java + uses: actions/setup-java@v4 + with: + distribution: "temurin" + java-version: "21" + + - name: Install Rust Toolchain + uses: dtolnay/rust-toolchain@stable + + - name: Install Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" + + - name: Prepare environment + shell: bash + run: | + if [[ "$RUNNER_OS" == "Linux" ]]; then + echo "PYTHON=python3" >> $GITHUB_ENV + else + echo "PYTHON=python" >> $GITHUB_ENV + fi + + - name: Build dist assets (as needed) + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + shell: bash + run: | + $PYTHON $GITHUB_WORKSPACE/scripts/package.py + + - name: Test dist assets + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + shell: bash + run: | + $PYTHON $GITHUB_WORKSPACE/scripts/test-dist.py