Skip to content

Commit

Permalink
add main-nightly-tests.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mario4tier committed Nov 21, 2024
1 parent 80eafc2 commit bef836d
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
outputs:
isDoc: ${{ steps.diff.outputs.isDoc }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Detect Changes
uses: "./.github/actions/diffs"
id: diff
Expand All @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
if: github.event.repository.fork == false
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.x
Expand Down
89 changes: 89 additions & 0 deletions .github/workflows/main-nightly-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Periodic tests of latest main branch
#

name: main nightly tests

# Controls when the workflow will run
on:
schedule:
- cron: "0 7 * * *" # every day 7AM

workflow_dispatch:

jobs:
test:
name: Test ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-2022]

steps:
- name: Checkout main Branch
uses: actions/checkout@v4
with:
ref: main

- name: Install build tools (Linux)
if: runner.os == 'Linux'
shell: bash
run: |
sudo apt update && sudo apt install -y automake libtool autogen mcpp openjdk-21-jdk
- name: Install Rust Toolchain (Linux)
if: runner.os == 'Linux'
uses: dtolnay/rust-toolchain@stable

- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.x"

- name: Create shell envs (Linux)
if: runner.os == 'Linux'
shell: bash
run: |
echo "PYTHON=python3" >> $GITHUB_ENV
- name: Create shell envs (Windows)
if: runner.os == 'Windows'
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe > msbuild_path.txt
set /p MSBUILD_PATH=<msbuild_path.txt
set VCVARSALL=%MSBUILD_PATH%\..\..\..\..\VC\Auxiliary\Build\vcvarsall.bat
echo VCVARSALL=%VCVARSALL% >> %GITHUB_ENV%
echo PYTHON=python >> %GITHUB_ENV%
- name: Build dist assets (Linux)
if: runner.os == 'Linux'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
$PYTHON $GITHUB_WORKSPACE/scripts/package.py
- name: Build dist assets (Windows x64)
if: runner.os == 'Windows'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: cmd
run: |
call "%VCVARSALL%" x64
%PYTHON% %GITHUB_WORKSPACE%\scripts\package.py
- name: Test dist assets (Linux)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
$PYTHON $GITHUB_WORKSPACE/scripts/test-dist.py
- name: Test dist assets (Windows x64)
if: runner.os == 'Windows'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: cmd
run: |
call "%VCVARSALL%" x64
%PYTHON% %GITHUB_WORKSPACE%\scripts\test-dist.py

0 comments on commit bef836d

Please sign in to comment.