Update Files

This commit is contained in:
2025-01-22 16:18:30 +01:00
parent ed4603cf95
commit a36294b518
16718 changed files with 2960346 additions and 0 deletions

View File

@ -0,0 +1,158 @@
parameters:
name: ''
vmImage: ''
arch: '' # hxcpp's target arch (HXCPP_Mxx), can be '32' or '64'
platform: '' # can be linux64, mac, windows, or windows64
listPlatform32: ['linux32', 'windows']
listPlatform64: ['linux64', 'mac', 'windows64']
jobs:
- job: ${{ parameters.name }}
pool:
vmImage: ${{ parameters.vmImage }}
variables:
${{ if startsWith(parameters.vmImage, 'ubuntu-') }}:
libExt: .dso
sep: '/'
${{ if contains(parameters.vmImage, 'mac') }}:
libExt: .dylib
sep: '/'
${{ if contains(parameters.vmImage, 'win') }}:
libExt: .dll
sep: '\'
steps:
- ${{ if startsWith(parameters.vmImage, 'ubuntu-') }}:
- script: |
set -ex
sudo rm -R /var/lib/mysql/
# mariadb
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup > mariadb_repo_setup
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup.sha256 > mariadb_repo_setup.sha256
sha256sum --check mariadb_repo_setup.sha256
sudo bash mariadb_repo_setup
sudo apt-get update -qqy
sudo apt-get remove -qqy mysql-common
sudo apt-get autoremove -qqy
sudo apt-get install -qqy mariadb-server
# remaining packages
sudo apt-get install -qqy gcc-multilib g++-multilib
displayName: Install dependencies
- script: |
set -ex
sudo systemctl start mysql
sudo mysql -u root -e "create database hxcpp; grant all privileges on hxcpp.* to hxcpp@localhost identified by 'hxcpp'; flush privileges;"
displayName: Configure MariaDB
- template: install-neko-snapshot.yaml
parameters:
platform: ${{ parameters.platform }}
- template: install-haxe-snapshot.yaml
parameters:
platform: ${{ parameters.platform }}
- script: |
set -ex
mkdir -p ~/haxelib
haxelib setup ~/haxelib
haxelib install utest
haxelib dev hxcpp $(Build.SourcesDirectory)
haxelib list
displayName: Install Haxe libraries
- script: haxe compile.hxml
workingDirectory: tools/run
displayName: Build run.n
- script: haxe compile.hxml
workingDirectory: tools/hxcpp
displayName: Build hxcpp
- script: haxe compile-cppia.hxml
workingDirectory: project
displayName: Build cppia
# cffi
- script: haxelib run hxcpp build.xml -debug -DHXCPP_M${{parameters.arch}}
workingDirectory: test/cffi/project
displayName: Build cffi project
- bash: |
set -ex
haxe compile.hxml -debug -D HXCPP_M${{parameters.arch}}
haxe compile-utf8.hxml -debug -D HXCPP_M${{parameters.arch}}
haxe compile-neko.hxml -debug -D HXCPP_M${{parameters.arch}}
workingDirectory: test/cffi
displayName: cffi test - Compile
- script: bin$(sep)cpp$(sep)TestMain-debug
workingDirectory: test/cffi
displayName: cffi test - Run
- script: bin$(sep)cpp-utf8$(sep)TestMain-debug
workingDirectory: test/cffi
displayName: cffi-utf8 test - Run
- ${{ if or(and(containsValue(parameters.listPlatform32, parameters.platform), eq(parameters.arch, '32')), and(containsValue(parameters.listPlatform64, parameters.platform), eq(parameters.arch, '64'))) }}:
- bash: cp test/cffi/project/ndll/*/prime$(libExt) test/cffi/bin/neko/prime.ndll
displayName: Copy prime.ndll
- script: neko TestMain.n
workingDirectory: test/cffi/bin/neko
displayName: cffi-neko test - Run
# haxe
- script: haxe compile.hxml -debug -D HXCPP_M${{parameters.arch}}
workingDirectory: test/haxe
displayName: haxe test - Compile
- script: bin$(sep)TestMain-debug
workingDirectory: test/haxe
displayName: haxe test - Run
# telemetry, should work in debug and non-debug modes
- script: haxe compile.hxml -debug -D HXCPP_M${{parameters.arch}}
workingDirectory: test/telemetry
displayName: telemetry test (debug) - Compile
- script: bin$(sep)TestMain-debug
workingDirectory: test/telemetry
displayName: telemetry test (debug) - Run
- script: haxe compile.hxml -D HXCPP_M${{parameters.arch}}
workingDirectory: test/telemetry
displayName: telemetry test - Compile
- script: bin$(sep)TestMain
workingDirectory: test/telemetry
displayName: telemetry test - Run
# std
- script: haxe compile${{parameters.arch}}.hxml
workingDirectory: test/std
displayName: std test - Compile
- script: cpp${{parameters.arch}}$(sep)Test
workingDirectory: test/std
displayName: std test - Run
# debugger
- script: haxe compile.hxml -D HXCPP_M${{parameters.arch}}
workingDirectory: test/debugger
displayName: debugger test - Compile
- script: bin$(sep)App-debug
workingDirectory: test/debugger
displayName: debugger test - Run
# native
- script: haxe compile.hxml -D HXCPP_M${{parameters.arch}}
workingDirectory: test/native
displayName: native test - Compile
- script: bin$(sep)Native
workingDirectory: test/native
displayName: native test - Run
# haxe unit test
- bash: |
set -ex
HAXE_VERSION=`haxe -version`
HAXE_HASH=`[[ "$HAXE_VERSION" =~ ^.+\+(.+) ]] && echo ${BASH_REMATCH[1]}`
git clone -q https://github.com/HaxeFoundation/haxe.git
pushd haxe
git reset --hard "$HAXE_HASH"
git clean -fdx
popd
displayName: haxe unit test - Clone haxe repo
- script: haxelib install compile-cpp.hxml --always
workingDirectory: haxe/tests/unit
displayName: haxe unit test - Install haxelibs
- script: haxe compile-cpp.hxml -D HXCPP_M${{parameters.arch}} -D no_http
workingDirectory: haxe/tests/unit
displayName: haxe unit test - Compile
- script: bin$(sep)cpp$(sep)TestMain-debug
workingDirectory: haxe/tests/unit
displayName: haxe unit test - Run

View File

@ -0,0 +1,31 @@
parameters:
platform: '' # can be linux64, mac, windows, or windows64
steps:
- ${{ if startsWith(parameters.platform, 'windows') }}:
- powershell: |
Invoke-WebRequest https://build.haxe.org/builds/haxe/${{parameters.platform}}/haxe_latest.zip -OutFile $(Agent.TempDirectory)/haxe_latest.zip
Expand-Archive $(Agent.TempDirectory)/haxe_latest.zip -DestinationPath $(Agent.TempDirectory)
Remove-Item $(Agent.TempDirectory)/haxe_latest.zip
$HAXEPATH = Get-Item $(Agent.TempDirectory)/haxe_*
$HAXE_STD_PATH = "$HAXEPATH\std"
Write-Host "##vso[task.prependpath]$HAXEPATH"
Write-Host "##vso[task.setvariable variable=HAXE_STD_PATH]$HAXE_STD_PATH"
displayName: Install Haxe using snapshot from S3
- ${{ if not(startsWith(parameters.platform, 'windows')) }}:
- bash: |
set -ex
DOWNLOADDIR=$(Agent.TempDirectory)
curl -sSL https://build.haxe.org/builds/haxe/${{parameters.platform}}/haxe_latest.tar.gz -o $(Agent.TempDirectory)/haxe_latest.tar.gz
tar -xf $(Agent.TempDirectory)/haxe_latest.tar.gz -C $(Agent.TempDirectory)
rm $(Agent.TempDirectory)/haxe_latest.tar.gz
HAXEPATH=`echo $(Agent.TempDirectory)/haxe_*`
sudo mkdir -p /usr/local/bin
sudo mkdir -p /usr/local/share/haxe
sudo ln -s $HAXEPATH/{haxe,haxelib} /usr/local/bin/
sudo ln -s $HAXEPATH/std /usr/local/share/haxe/std
set +x
echo "##vso[task.setvariable variable=HAXE_STD_PATH]/usr/local/share/haxe/std"
displayName: Install Haxe using snapshot from S3
- script: haxe -version
displayName: Print Haxe version

View File

@ -0,0 +1,33 @@
parameters:
platform: '' # can be linux64, mac, windows, or windows64
steps:
- ${{ if startsWith(parameters.platform, 'windows') }}:
- powershell: |
Invoke-WebRequest https://build.haxe.org/builds/neko/${{parameters.platform}}/neko_latest.zip -OutFile $(Agent.TempDirectory)/neko_latest.zip
Expand-Archive $(Agent.TempDirectory)/neko_latest.zip -DestinationPath $(Agent.TempDirectory)
$NEKOPATH = Get-ChildItem $(Agent.TempDirectory)/neko-*-win
Write-Host "##vso[task.prependpath]$NEKOPATH"
Write-Host "##vso[task.setvariable variable=NEKOPATH]$NEKOPATH"
displayName: Install Neko using snapshot from S3
- ${{ if not(startsWith(parameters.platform, 'windows')) }}:
- bash: |
set -ex
DOWNLOADDIR=$(Agent.TempDirectory)
curl -sSL https://build.haxe.org/builds/neko/${{parameters.platform}}/neko_latest.tar.gz -o $(Agent.TempDirectory)/neko_latest.tar.gz
tar -xf $(Agent.TempDirectory)/neko_latest.tar.gz -C $(Agent.TempDirectory)
NEKOPATH=`echo $(Agent.TempDirectory)/neko-*-*`
sudo mkdir -p /usr/local/bin
sudo mkdir -p /usr/local/lib/neko
sudo ln -s $NEKOPATH/{neko,nekoc,nekoml,nekotools} /usr/local/bin/
sudo ln -s $NEKOPATH/libneko.* /usr/local/lib/
sudo ln -s $NEKOPATH/*.ndll /usr/local/lib/neko/
set +x
echo "##vso[task.prependpath]$NEKOPATH"
echo "##vso[task.setvariable variable=NEKOPATH]$NEKOPATH"
displayName: Install Neko using snapshot from S3
- ${{ if eq(parameters.platform, 'linux64') }}:
- bash: sudo ldconfig
displayName: ldconfig
- script: neko -version 2>&1
displayName: Print Neko version