diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..bff9acf --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,64 @@ +name: CI + +on: [push, pull_request] + +jobs: + test-core: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + haxe-version: [4.3.0] + node-version: ['14'] + python-version: ['3.x'] + test-target: + # HAXE TARGETS + - cpp + - cs + - interp + - js + - nodejs + - py + runs-on: ${{ matrix.os }} + env: + CI_OS_NAME: ${{ matrix.os }} + steps: + - uses: actions/checkout@v3 + # Set up Kiss runtimes: + + # nodejs + - uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + if: test-target == 'nodejs' + + # lix + - uses: kiss-lang/setup-lix@main + with: + lix-version: 15.12.0 + + # python + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + if: test-target == 'py' + + # mono + - run: brew install mono || brew link --overwrite mono + if: matrix.os == 'macos-latest' && test-target == 'cs' + - run: choco install mono + if: matrix.os == 'windows-latest' && test-target == 'cs' + - run: | + # instructions for ubuntu 20.04 from here: https://www.mono-project.com/download/stable/#download-lin + sudo apt install gnupg ca-certificates + sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF + echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list + sudo apt update + sudo apt install mono-devel + if: matrix.os == 'ubuntu-latest' && test-target == 'cs' + + # run target test: + - run: echo "KISS_TARGET=${{ matrix.test-target }}" >> $GITHUB_ENV + - run: ./test.sh + shell: bash +