浏览代码

[ci] Migrate fully to Github Actions and clean up (#565)

* [ci] Remove redundant step

We do not need to download this since vs2019 is preinstalled in the
environment

* [ci] Start to port remaining azure scripts to GHA

* [ci] Be more specific about build system

"make" and "vs2019" instead of "default"

* [ci] Separate architecture from target variable

* [ci] Fix ls of files after build

Now runs in the build system specific build directory

* [ci] Clean up haxe latest download

* [ci] Use existing make packaging targets

* [ci] Package with cpack directly instead of cmake

* [ci] Specify architecture when packaging with make

* [make] Use 7z for zipping windows build

* [make] Be more precise about headers to package

This is to avoid packaging the hlc.json file which is created during
testing

* [make] Fix make calls

This improves portability

* [ci] Update "latest" release creation

- Adapt to artifact name changes

- Use official github cli

- Change the release name to HashLink Nightly Build to be clearer

* [ci] Keep artifacts around

They get deleted automatically anyway

* [ci] Remove azure files

Good riddance
tobil4sk 3 年之前
父节点
当前提交
bb572cb47a

+ 125 - 117
.github/workflows/build.yml

@@ -21,47 +21,65 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        include:
-          - target: linux-i386
-            runner: ubuntu-18.04
-            haxe_latest_dist: linux64/haxe_latest.tar.gz
+        target: [linux, darwin, windows]
+        architecture: [32, 64]
+        build_system: [make, cmake, vs2019]
 
-          - target: linux-amd64
+        include:
+          - target: linux
             runner: ubuntu-18.04
-            haxe_latest_dist: linux64/haxe_latest.tar.gz
+            haxe_nightly_dir: linux64
+            archive_ext: tar.gz
 
           - target: darwin
             runner: macos-10.15
-            haxe_latest_dist: mac/haxe_latest.tar.gz
+            haxe_nightly_dir: mac
+            archive_ext: tar.gz
+
+          - build_system: cmake
+            cmake_configuration: RelWithDebInfo
 
-          - target: win32
+          - build_system: vs2019
+            msbuild_configuration: Release
+
+          - target: windows
             runner: windows-2019 # has VS2019 preinstalled which supports PlatformToolset <= v142, WindowsTargetPlatformVersion 10
-            haxe_latest_dist: windows64/haxe_latest.zip
+            haxe_nightly_dir: windows64
+            archive_ext: zip
+
+          - target: windows
+            build_system: cmake
+            cmake_generator: Visual Studio 16 2019
+
+          - target: windows
+            architecture: 32
             ffmpeg_url: https://github.com/HaxeFoundation/hashlink/files/5648055/ffmpeg-3.4.2-win32-dev.zip
-            msbuild_Configuration: Release
-            msbuild_Platform: Win32
-            msbuild_PlatformToolset: v142
-            msbuild_WindowsTargetPlatformVersion: 10.0
+            architecture_string: Win32
 
-          - target: win64
-            runner: windows-2019 # has VS2019 preinstalled which supports PlatformToolset <= v142, WindowsTargetPlatformVersion 10
-            haxe_latest_dist: windows64/haxe_latest.zip
+          - target: windows
+            architecture: 64
             ffmpeg_url: https://github.com/HaxeFoundation/hashlink/files/5648056/ffmpeg-3.4.2-win64-dev.zip
-            msbuild_Configuration: Release
-            msbuild_Platform: x64
-            msbuild_PlatformToolset: v142
-            msbuild_WindowsTargetPlatformVersion: 10.0
+            architecture_string: x64
+
+        exclude:
+          - target: linux
+            build_system: vs2019
+
+          - target: darwin
+            build_system: vs2019
+
+          - target: darwin
+            architecture: 32
+
+          - target: windows
+            build_system: make
 
     steps:
     - name: "SCM Checkout"
       uses: actions/checkout@v2
 
-    - name: "Install: Visual C++ build tools workload for Visual Studio 2019 Build Tools"
-      if: startsWith(matrix.target, 'win')
-      run: choco install visualstudio2019buildtools visualstudio2019-workload-vctools
-
     - name: Add msbuild to PATH
-      if: startsWith(matrix.target, 'win')
+      if: matrix.build_system == 'vs2019'
       uses: microsoft/[email protected]
       with:
         vs-version: '[16.0,17.0)'
@@ -70,8 +88,8 @@ jobs:
       run: |
         set -eux
 
-        case "${{ matrix.target }}" in
-          linux-i386)
+        case "${{ matrix.target }}${{ matrix.architecture }}" in
+          linux32)
             echo "MARCH=32" >> $GITHUB_ENV
             sudo dpkg --add-architecture i386
             sudo apt-get update -y
@@ -90,7 +108,7 @@ jobs:
               libsqlite3-dev:i386
             ;;
 
-          linux-amd64)
+          linux64)
             echo "MARCH=64" >> $GITHUB_ENV
             sudo apt-get update -y
             sudo apt-get install --no-install-recommends -y \
@@ -109,7 +127,7 @@ jobs:
             brew bundle
             ;;
 
-          win*)
+          windows*)
             curl -fsSL --retry 3 --retry-delay 5 -o /tmp/sdl.zip https://www.libsdl.org/release/SDL2-devel-2.0.5-VC.zip
             curl -fsSL --retry 3 --retry-delay 5 -o /tmp/openal.zip https://openal-soft.org/openal-binaries/openal-soft-1.17.2-bin.zip
             curl -fsSL --retry 3 --retry-delay 5 -o /tmp/ffmpeg.zip ${{ matrix.ffmpeg_url }}
@@ -125,15 +143,15 @@ jobs:
         set -eux
 
         case "${{ matrix.target }}" in
-          linux*)
+          linux)
             sudo apt-get install --no-install-recommends -y neko
             ;;
 
-          darwin*)
+          darwin)
             brew install neko
             ;;
 
-          win*)
+          windows)
             choco install --no-progress neko -y
             nekopath=$(find C:/ProgramData/chocolatey/lib/neko -name neko.dll -printf '%h\n')
             echo "NEKOPATH=$nekopath" >> $GITHUB_ENV
@@ -146,9 +164,9 @@ jobs:
       run: |
         set -eux
 
-        download_url="https://build.haxe.org/builds/haxe/${{ matrix.haxe_latest_dist }}"
+        download_url="https://build.haxe.org/builds/haxe/${{ matrix.haxe_nightly_dir }}/haxe_latest.${{ matrix.archive_ext }}"
         echo "Downloading [$download_url]..."
-        if [[ ${{ matrix.target }} == win* ]]; then
+        if [[ ${{ matrix.target }} == windows ]]; then
           curl -fsSL --retry 3 --retry-delay 5 "$download_url" -o /tmp/haxe.zip
           7z x /tmp/haxe.zip -o/tmp
           mv -v /tmp/haxe_* /tmp/haxe
@@ -178,47 +196,68 @@ jobs:
       run: |
         set -eux
 
-        case "${{ matrix.target }}" in
-          linux*)
-            make
-            sudo make install
-            sudo ldconfig
+        case "${{ matrix.build_system }}" in
+          cmake)
+            case "${{ matrix.target }}${{ matrix.architecture }}" in
+              linux32)
+                cmake . -DCMAKE_BUILD_TYPE=${{ matrix.cmake_configuration }} -DCMAKE_TOOLCHAIN_FILE=other/cmake/linux32.toolchain.cmake ;;
+              windows*)
+                cmake . -DCMAKE_BUILD_TYPE=${{ matrix.cmake_configuration }} \
+                  -G "${{ matrix.cmake_generator }}" \
+                  -A ${{ matrix.architecture_string }}
+                ;;
+              *)
+                cmake . -DCMAKE_BUILD_TYPE=${{ matrix.cmake_configuration }} ;;
+            esac
+
+            cmake --build . --config ${{ matrix.cmake_configuration }}
+            BUILD_FOLDER=bin
             ;;
 
-          darwin*)
+          vs2019)
+            MSBuild.exe hl.sln //nologo //m //clp:ErrorsOnly \
+              //p:Configuration=${{ matrix.msbuild_configuration }} \
+              //p:Platform=${{ matrix.architecture_string }}
+
+            case "${{ matrix.architecture }}" in
+              64) BUILD_FOLDER=x64/${{ matrix.msbuild_configuration }} ;;
+              32) BUILD_FOLDER=${{ matrix.msbuild_configuration }} ;;
+            esac
+            echo "WINDOWS_BUILD_FOLDER=$BUILD_FOLDER" >> $GITHUB_ENV
+            ;;
+
+          make)
             make
-            sudo make codesign_osx
+            if [[ ${{ matrix.target }} == darwin ]]; then
+              sudo make codesign_osx
+            fi
             sudo make install
+            if [[ ${{ matrix.target }} == linux ]]; then
+              sudo ldconfig
+            fi
+            BUILD_FOLDER=.
             ;;
 
-          win*)
-            MSBuild.exe hl.sln //nologo //m //clp:ErrorsOnly \
-              //p:Configuration=${{ matrix.msbuild_Configuration }} \
-              //p:Platform=${{ matrix.msbuild_Platform }} \
-              //p:PlatformToolset=${{ matrix.msbuild_PlatformToolset }} \
-              //p:WindowsTargetPlatformVersion=${{ matrix.msbuild_WindowsTargetPlatformVersion }}
-            ;;
         esac
 
-        ls -l .
-
+        ls -l $BUILD_FOLDER
 
     - name: "Test"
       run: |
         set -eux
 
-        case "${{ matrix.target }}" in
-          win32)
-            ${{ matrix.msbuild_Configuration }}/hl.exe --version
+        case "${{ matrix.build_system }}" in
+          cmake)
+            ctest --verbose --build-config ${{ matrix.cmake_configuration }}
             ;;
-          win64)
-            x64/${{ matrix.msbuild_Configuration }}/hl.exe --version
+          vs2019)
+            ${{ env.WINDOWS_BUILD_FOLDER }}/hl.exe --version
             ;;
-          *)
+          make)
             ./hl --version
             case ${{ matrix.target }} in
-              linux*)  ldd -v ./hl ;;
-              darwin*) otool -L ./hl ;;
+              linux)  ldd -v ./hl ;;
+              darwin) otool -L ./hl ;;
             esac
 
             haxe -hl hello.hl -cp other/tests -main HelloWorld -D interp
@@ -227,6 +266,7 @@ jobs:
             haxe -hl src/_main.c -cp other/tests -main HelloWorld
             make hlc
             ./hlc
+            ;;
         esac
 
 
@@ -234,57 +274,30 @@ jobs:
       run: |
         set -eux
 
-        dist_folder=hashlink-$(git rev-parse --short $GITHUB_SHA)-${{ matrix.target }}
+        case "${{ matrix.target }}${{matrix.architecture}}" in
+          darwin*)   platform_name=darwin ;;
+          windows*)  platform_name=win${{matrix.architecture}} ;;
+          linux32)   platform_name=linux-i386 ;;
+          linux64)   platform_name=linux-amd64 ;;
+        esac
 
-        #
-        # Collect files for the distribution
-        #
-        mkdir -p $dist_folder/include
-        cp src/hl.h $dist_folder/include
-        cp src/hlc.h $dist_folder/include
-        cp src/hlc_main.c $dist_folder/include
+        short_commit=$(git rev-parse --short HEAD)
 
-        case "${{ matrix.target }}" in
-          linux*)
-            cp hl $dist_folder/
-            cp *.{hdll,so} $dist_folder/
-            ;;
+        case "${{ matrix.build_system }}" in
+          cmake)
+            dist_folder=hashlink-${short_commit}-${platform_name}-cmake
+            cpack -D CPACK_PACKAGE_FILE_NAME=$dist_folder -C ${{ matrix.cmake_configuration }}
 
-          darwin*)
-            cp hl $dist_folder/
-            cp *.{hdll,dylib} $dist_folder/
-            ;;
-
-          win32)
-            cp ${{ matrix.msbuild_Configuration }}/*.{dll,exe,lib,hdll} $dist_folder/
-            cp /c/Windows/System32/msvcr120.dll $dist_folder/
-            cp include/openal/bin/Win32/soft_oal.dll $dist_folder/OpenAL32.dll
-            cp include/sdl/lib/x86/SDL2.dll $dist_folder/
+            echo "HASHLINK_DISTRIBUTION=bin/$dist_folder.${{ matrix.archive_ext }}" >> $GITHUB_ENV
             ;;
+          *)
+            dist_folder=hashlink-${short_commit}-${platform_name}
+            make PACKAGE_NAME=$dist_folder MARCH=${{ matrix.architecture }} release
 
-          win64)
-            cp x64/${{ matrix.msbuild_Configuration }}/*.{dll,exe,lib,hdll} $dist_folder/
-            cp /c/Windows/System32/msvcr120.dll $dist_folder/
-            cp include/openal/bin/Win64/soft_oal.dll $dist_folder/OpenAL32.dll
-            cp include/sdl/lib/x64/SDL2.dll $dist_folder/
+            echo "HASHLINK_DISTRIBUTION=$dist_folder.${{ matrix.archive_ext }}" >> $GITHUB_ENV
             ;;
         esac
 
-        #
-        # Create the tar.gz/zip
-        #
-        case "${{ matrix.target }}" in
-          win*)
-            # 7z switches: https://sevenzip.osdn.jp/chm/cmdline/switches/
-            7z a -spf -y -mx9 -bt hashlink-latest-${{ matrix.target }}.zip $dist_folder
-            echo "HASHLINK_DISTRIBUTION=hashlink-latest-${{ matrix.target }}.zip" >> $GITHUB_ENV
-            ;;
-
-          *)
-            tar cvfz hashlink-latest-${{ matrix.target }}.tar.gz $dist_folder
-            echo "HASHLINK_DISTRIBUTION=hashlink-latest-${{ matrix.target }}.tar.gz" >> $GITHUB_ENV
-            ;;
-        esac
 
     - name: "Share: build artifact"
       uses: actions/upload-artifact@v2
@@ -304,7 +317,6 @@ jobs:
     steps:
 
     - name: "SCM Checkout"
-      # only required by "hub release create" to prevent "fatal: Not a git repository"
       uses: actions/checkout@v2
 
     - name: "Get: all build artifacts"
@@ -317,7 +329,7 @@ jobs:
         api_base_url="$GITHUB_API_URL/repos/$GITHUB_REPOSITORY"
 
         # delete 'latest' github release
-        release_id=$(curl -fsL -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/$GITHUB_REPOSITORY/releases | jq -r '.[] | select(.name == "latest") | .id')
+        release_id=$(curl -fsL -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/$GITHUB_REPOSITORY/releases | jq -r '.[] | select(.tag_name == "latest") | .id')
         if [[ -n $release_id ]]; then
            echo "Deleting release [$api_base_url/releases/$release_id]..."
            curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -fsSL -X DELETE "$api_base_url/releases/$release_id"
@@ -337,18 +349,14 @@ jobs:
         set -eux
 
         # https://hub.github.com/hub-release.1.html
-        hub release create "latest" \
+
+        short_commit=$(git rev-parse --short HEAD)
+
+        gh release create latest \
           --prerelease \
-          --message "latest" \
-          --attach "artifact/hashlink-latest-darwin.tar.gz" \
-          --attach "artifact/hashlink-latest-linux-amd64.tar.gz" \
-          --attach "artifact/hashlink-latest-win32.zip" \
-          --attach "artifact/hashlink-latest-win64.zip" \
-          --attach "artifact/hashlink-latest-linux-i386.tar.gz"
-
-    - name: "Delete intermediate build artifacts"
-      uses: geekyeggo/delete-artifact@1-glob-support # https://github.com/GeekyEggo/delete-artifact/
-      with:
-        name: "*"
-        useGlob: true
-        failOnError: false
+          --title "HashLink Nightly Build" \
+          "artifact/hashlink-${short_commit}-darwin.tar.gz#hashlink-latest-darwin.tar.gz" \
+          "artifact/hashlink-${short_commit}-linux-i386.tar.gz#hashlink-latest-linux-i386.tar.gz" \
+          "artifact/hashlink-${short_commit}-linux-amd64.tar.gz#hashlink-latest-linux-amd64.tar.gz" \
+          "artifact/hashlink-${short_commit}-win32.zip#hashlink-latest-win32.zip" \
+          "artifact/hashlink-${short_commit}-win64.zip#hashlink-latest-win64.zip"

+ 36 - 29
Makefile

@@ -63,9 +63,18 @@ ifeq ($(OS),Windows_NT)
 LIBFLAGS += -Wl,--export-all-symbols
 LIBEXT = dll
 RELEASE_NAME=win
+# VS variables are for packaging Visual Studio builds
+VS_RUNTIME_LIBRARY ?= c:/windows/system32/vcruntime140.dll
 
 ifeq ($(MARCH),32)
 CC=i686-pc-cygwin-gcc
+BUILD_DIR = Release
+VS_SDL_LIBRARY ?= include/sdl/lib/x86/SDL2.dll
+VS_OPENAL_LIBRARY ?= include/openal/bin/Win32/soft_oal.dll
+else
+BUILD_DIR = x64/Release
+VS_SDL_LIBRARY ?= include/sdl/lib/x64/SDL2.dll
+VS_OPENAL_LIBRARY ?= include/openal/bin/Win64/soft_oal.dll
 endif
 
 else ifeq ($(UNAME),Darwin)
@@ -124,7 +133,7 @@ endif
 all: libhl hl libs
 
 install:
-	$(UNAME)==Darwin && make uninstall
+	$(UNAME)==Darwin && ${MAKE} uninstall
 	mkdir -p $(INSTALL_BIN_DIR)
 	cp hl $(INSTALL_BIN_DIR)
 	mkdir -p $(INSTALL_LIB_DIR)
@@ -182,21 +191,14 @@ sqlite: ${SQLITE} libhl
 	${CC} ${CFLAGS} -shared -o sqlite.hdll ${SQLITE} ${LIBFLAGS} -L. -lhl -lsqlite3
 
 mesa:
-	(cd libs/mesa && make)
-
-release: release_version release_$(RELEASE_NAME)
+	(cd libs/mesa && ${MAKE})
 
-release_version:
-	$(eval HL_VER := `(hl --version)`-$(RELEASE_NAME))
-	rm -rf hl-$(HL_VER)
-	mkdir hl-$(HL_VER)
-	mkdir hl-$(HL_VER)/include
-	cp src/hl.h src/hlc* hl-$(HL_VER)/include
+release: release_prepare release_$(RELEASE_NAME)
 
 release_haxelib:
-	make HLIB=directx release_haxelib_package
-	make HLIB=sdl release_haxelib_package
-	make HLIB=openal release_haxelib_package
+	${MAKE} HLIB=directx release_haxelib_package
+	${MAKE} HLIB=sdl release_haxelib_package
+	${MAKE} HLIB=openal release_haxelib_package
 
 ifeq ($(HLIB),directx)
 HLPACK=dx
@@ -212,23 +214,28 @@ release_haxelib_package:
 	haxelib submit $(HLIB).zip
 	rm -rf $(HLIB)_release
 
+BUILD_DIR ?= .
+PACKAGE_NAME := hashlink-$(shell $(BUILD_DIR)/hl --version)-$(RELEASE_NAME)
+
+release_prepare:
+	rm -rf $(PACKAGE_NAME)
+	mkdir $(PACKAGE_NAME)
+	mkdir $(PACKAGE_NAME)/include
+	cp src/hl.h src/hlc.h src/hlc_main.c $(PACKAGE_NAME)/include
+
 release_win:
-	(cd x64/Release && cp hl.exe libhl.dll *.hdll *.lib ../../hl-$(HL_VER))
-	cp c:/windows/system32/vcruntime140.dll hl-$(HL_VER)
-	cp `which SDL2.dll` hl-$(HL_VER)
-	cp `which OpenAL32.dll` hl-$(HL_VER)
-	zip -r hl-$(HL_VER).zip hl-$(HL_VER)
-	rm -rf hl-$(HL_VER)
-
-release_linux:
-	cp hl libhl.so *.hdll hl-$(HL_VER)
-	tar -czf hl-$(HL_VER).tgz hl-$(HL_VER)
-	rm -rf hl-$(HL_VER)
-
-release_osx:
-	cp hl libhl.dylib *.hdll hl-$(HL_VER)
-	tar -czf hl-$(HL_VER).tgz hl-$(HL_VER)
-	rm -rf hl-$(HL_VER)
+	cp $(BUILD_DIR)/{hl.exe,libhl.dll,*.hdll,*.lib} $(PACKAGE_NAME)
+	cp $(VS_RUNTIME_LIBRARY) $(PACKAGE_NAME)
+	cp $(VS_SDL_LIBRARY) $(PACKAGE_NAME)
+	cp $(VS_OPENAL_LIBRARY) $(PACKAGE_NAME)/OpenAL32.dll
+	# 7z switches: https://sevenzip.osdn.jp/chm/cmdline/switches/
+	7z a -spf -y -mx9 -bt $(PACKAGE_NAME).zip $(PACKAGE_NAME)
+	rm -rf $(PACKAGE_NAME)
+
+release_linux release_osx:
+	cp hl libhl.$(LIBEXT) *.hdll $(PACKAGE_NAME)
+	tar -cvzf $(PACKAGE_NAME).tar.gz $(PACKAGE_NAME)
+	rm -rf $(PACKAGE_NAME)
 
 codesign_osx:
 	sudo security delete-identity -c hl-cert || echo

+ 0 - 55
azure-pipelines.yml

@@ -1,55 +0,0 @@
-variables:
-  - group: variables-haxe
-
-stages:
-  - stage: StageTest
-    jobs:
-      - template: other/azure-pipelines/build-linux.yml
-        parameters:
-          name: Linux64_CMake
-          buildSystem: cmake
-      - template: other/azure-pipelines/build-linux.yml
-        parameters:
-          name: Linux32_CMake
-          arch: i386
-          buildSystem: cmake
-
-      - template: other/azure-pipelines/build-linux.yml
-        parameters:
-          name: Linux64_Make
-          buildSystem: make
-      - template: other/azure-pipelines/build-linux.yml
-        parameters:
-          name: Linux32_Make
-          arch: i386
-          buildSystem: make
-
-      - template: other/azure-pipelines/build-mac.yml
-        parameters:
-          name: Mac_CMake
-          buildSystem: cmake
-      - template: other/azure-pipelines/build-mac.yml
-        parameters:
-          name: Mac_Make
-          buildSystem: make
-
-      - template: other/azure-pipelines/build-windows.yml
-        parameters:
-          name: Windows64_CMake
-          vmImage: 'windows-2019'
-          buildSystem: cmake
-          cmakeGenerator: 'Visual Studio 16 2019'
-
-      - template: other/azure-pipelines/build-windows.yml
-        parameters:
-          name: Windows32_CMake
-          vmImage: 'windows-2019'
-          buildSystem: cmake
-          cmakeGenerator: 'Visual Studio 16 2019'
-          architecture: 'Win32'
-
-      - template: other/azure-pipelines/build-windows.yml
-        parameters:
-          name: Windows_VS
-          vmImage: 'windows-2019'
-          buildSystem: vs

+ 0 - 117
other/azure-pipelines/build-linux.yml

@@ -1,117 +0,0 @@
-parameters:
-  name: 'BuildLinux'
-  vmImage: 'ubuntu-18.04'
-  container: 'debian:stretch'
-  arch: '' # set it to i386 for 32-bit build
-  buildSystem: 'cmake' # either 'cmake' or 'make'
-  cmakeConfig: 'RelWithDebInfo'
-
-jobs:
-  - job: ${{ parameters.name }}
-    pool:
-      vmImage: ${{ parameters.vmImage }}
-    container:
-      image: ${{ parameters.container }}
-      options: --name ci-container -v /usr/bin/docker:/tmp/docker:ro
-    variables:
-      DEBIAN_FRONTEND: noninteractive
-      ${{ if eq(parameters.arch, '') }}:
-        CMAKE_TOOLCHAIN: ''
-        MARCH: 64
-      ${{ if eq(parameters.arch, 'i386') }}:
-        CMAKE_TOOLCHAIN: -DCMAKE_TOOLCHAIN_FILE=other/cmake/linux32.toolchain.cmake
-        MARCH: 32
-    steps:
-      - script: |
-          /tmp/docker exec -t -u 0 ci-container \
-          sh -c "apt-get update && apt-get -o Dpkg::Options::="--force-confold" -y install sudo"
-        displayName: Setup sudo
-      - ${{ if eq(parameters.arch, '') }}:
-        - script: |
-            set -ex
-            sudo apt-get update -qqy
-            sudo apt-get install -qqy \
-              cmake \
-              make \
-              gcc \
-              libz-dev \
-              zlib1g-dev \
-              libpng-dev \
-              libsdl2-dev \
-              libvorbis-dev \
-              libalut-dev \
-              libmbedtls-dev \
-              libturbojpeg0-dev \
-              libuv1-dev \
-              libopenal-dev \
-              libsqlite3-dev \
-              neko \
-              curl \
-              ca-certificates
-          displayName: Install dependencies
-      - ${{ if not(eq(parameters.arch, '')) }}:
-        - script: |
-            set -ex
-            sudo dpkg --add-architecture ${{ parameters.arch }}
-            sudo apt-get update -qqy
-            sudo apt-get install -qqy \
-              cmake \
-              make \
-              gcc-multilib \
-              libz-dev:${{ parameters.arch }} \
-              zlib1g-dev:${{ parameters.arch }} \
-              libpng-dev:${{ parameters.arch }} \
-              libsdl2-dev:${{ parameters.arch }} \
-              libvorbis-dev:${{ parameters.arch }} \
-              libalut-dev:${{ parameters.arch }} \
-              libmbedtls-dev:${{ parameters.arch }} \
-              libturbojpeg0-dev:i386 \
-              libuv1-dev:${{ parameters.arch }} \
-              libopenal-dev:${{ parameters.arch }} \
-              libsqlite3-dev:${{ parameters.arch }} \
-              neko \
-              curl \
-              ca-certificates
-          displayName: Install dependencies
-      - template: install-haxe-snapshot.yml
-        parameters:
-          platform: linux64
-      - script: |
-          set -ex
-          haxelib setup ~/haxelib
-          haxelib install hashlink
-          haxelib list
-        displayName: Install hashlink haxelib
-      - ${{ if eq(parameters.buildSystem, 'cmake') }}:
-        - script: cmake . -DCMAKE_BUILD_TYPE=${{ parameters.cmakeConfig }} $(CMAKE_TOOLCHAIN)
-          displayName: CMake
-        - script: make
-          displayName: Build
-        - script: |
-            set -ex
-            ldd -v ./bin/hl
-          displayName: Check runtime dependencies
-        - script: ctest --verbose
-          displayName: Test
-        - script: make package
-          displayName: Package
-        - task: PublishPipelineArtifact@1
-          inputs:
-            artifactName: ${{ parameters.name }}Binaries
-            targetPath: bin/hashlink-1.12.0-Linux.tar.gz
-      - ${{ if eq(parameters.buildSystem, 'make') }}:
-        - script: make
-          displayName: Build
-        - script: |
-            set -ex
-            sudo make install
-            sudo ldconfig
-          displayName: Install
-        - script: |
-            set -ex
-            haxe -hl hello.hl -cp other/tests -main HelloWorld -D interp
-            ./hl hello.hl
-            haxe -hl src/_main.c -cp other/tests -main HelloWorld
-            make hlc
-            ./hlc
-          displayName: Test

+ 0 - 58
other/azure-pipelines/build-mac.yml

@@ -1,58 +0,0 @@
-parameters:
-  name: 'BuildMac'
-  vmImage: 'macOS-10.15'
-  buildSystem: 'cmake' # either 'cmake' or 'make'
-  cmakeConfig: 'RelWithDebInfo'
-
-jobs:
-  - job: ${{ parameters.name }}
-    pool:
-      vmImage: ${{ parameters.vmImage }}
-    steps:
-      - script: |
-          set -ex
-          brew update
-          brew install neko
-          brew bundle
-        displayName: Install dependencies
-      - template: install-haxe-snapshot.yml
-        parameters:
-          platform: mac
-      - script: |
-          set -ex
-          haxelib setup ~/haxelib
-          haxelib install hashlink
-          haxelib list
-        displayName: Install hashlink haxelib
-      - ${{ if eq(parameters.buildSystem, 'cmake') }}:
-        - script: cmake . -DCMAKE_BUILD_TYPE=${{ parameters.cmakeConfig }}
-          displayName: CMake
-        - script: make
-          displayName: Build
-        - script: |
-            set -ex
-            otool -L ./bin/hl
-          displayName: Check runtime dependencies
-        - script: ctest --verbose
-          displayName: Test
-        - script: make package
-          displayName: Package
-        - task: PublishPipelineArtifact@1
-          inputs:
-            artifactName: ${{ parameters.name }}Binaries
-            targetPath: bin/hashlink-1.12.0-Darwin.tar.gz
-      - ${{ if eq(parameters.buildSystem, 'make') }}:
-        - script: make
-          displayName: Build
-        - script: sudo make codesign_osx
-          displayName: Codesign
-        - script: sudo make install
-          displayName: Install
-        - script: |
-            set -ex
-            haxe -hl hello.hl -cp other/tests -main HelloWorld -D interp
-            ./hl hello.hl
-            haxe -hl src/_main.c -cp other/tests -main HelloWorld
-            make hlc
-            ./hlc
-          displayName: Test

+ 0 - 69
other/azure-pipelines/build-windows.yml

@@ -1,69 +0,0 @@
-parameters:
-  name: 'BuildWindows'
-  vmImage: ''
-  buildSystem: 'cmake' # either 'cmake' or 'vs'
-  architecture: 'x64' # either 'x64' or 'Win32'
-  cmakeGenerator: ''
-  cmakeConfig: 'RelWithDebInfo'
-
-jobs:
-  - job: ${{ parameters.name }}
-    pool:
-      vmImage: ${{ parameters.vmImage }}
-    variables:
-      ${{ if eq(parameters.architecture, 'x64') }}:
-        MARCH: 64
-        FFMPEG_URL: https://github.com/HaxeFoundation/hashlink/files/5648056/ffmpeg-3.4.2-win64-dev.zip
-      ${{ if eq(parameters.architecture, 'Win32') }}:
-        MARCH: 32
-        FFMPEG_URL: https://github.com/HaxeFoundation/hashlink/files/5648055/ffmpeg-3.4.2-win32-dev.zip
-    steps:
-      - powershell: |
-          Invoke-WebRequest https://www.libsdl.org/release/SDL2-devel-2.0.5-VC.zip -OutFile SDL.zip
-          Expand-Archive SDL.zip -DestinationPath .
-          Move-Item SDL2-* include/sdl
-          Remove-Item SDL.zip
-        displayName: Install sdl
-      - powershell: |
-          Invoke-WebRequest http://openal-soft.org/openal-binaries/openal-soft-1.17.2-bin.zip -OutFile openal.zip
-          Expand-Archive openal.zip -DestinationPath .
-          Move-Item openal-* include/openal
-          Remove-Item openal.zip
-        displayName: Install openal
-      - powershell: |
-          Invoke-WebRequest $(FFMPEG_URL) -OutFile ffmpeg.zip
-          Expand-Archive ffmpeg.zip -DestinationPath .
-          Move-Item ffmpeg-* include/ffmpeg
-          Remove-Item ffmpeg.zip
-        displayName: Install ffmpeg
-      - powershell: |
-          Set-Service wuauserv -StartupType Manual
-          choco install --no-progress neko -y
-          $nekoPath = (Get-ChildItem C:/ProgramData/chocolatey/lib/neko/*/neko.dll -Recurse).Directory
-          Write-Host "##vso[task.setvariable variable=NEKOPATH]$nekoPath"
-        displayName: 'Install Neko'
-      - template: install-haxe-snapshot.yml
-        parameters:
-          platform: windows64
-      - script: |
-          haxelib setup ~/haxelib
-          haxelib install hashlink
-          haxelib list
-        displayName: Install hashlink haxelib
-      - ${{ if eq(parameters.buildSystem, 'cmake') }}:
-        - script: cmake . -G "${{ parameters.cmakeGenerator }}" -A ${{ parameters.architecture }}
-          displayName: CMake
-        - script: cmake --build . --config ${{ parameters.cmakeConfig }}
-          displayName: Build
-        - script: ctest --verbose --build-config ${{ parameters.cmakeConfig }}
-          displayName: Test
-        - script: cmake --build . --config ${{ parameters.cmakeConfig }} --target PACKAGE
-          displayName: Package binaries
-        - task: PublishPipelineArtifact@1
-          inputs:
-            artifactName: ${{ parameters.name }}Binaries
-            targetPath: bin/hashlink-1.12.0-win$(MARCH).zip
-      - ${{ if eq(parameters.buildSystem, 'vs') }}:
-        - task: MSBuild@1
-          inputs:
-            solution: hl.sln

+ 0 - 31
other/azure-pipelines/install-haxe-snapshot.yml

@@ -1,31 +0,0 @@
-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