diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml new file mode 100644 index 00000000000..dea50a745e5 --- /dev/null +++ b/.github/workflows/build-docker.yml @@ -0,0 +1,57 @@ +--- +name: Build - Docker + +on: + pull_request: + push: + branches: + - master + - dev + - devel + - develop + +env: + VCPKG_BUILD_TYPE: release + CMAKE_BUILD_PARALLEL_LEVEL: 2 + MAKEFLAGS: '-j 2' + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Install GitVersion + uses: gittools/actions/gitversion/setup@v0.9.9 + with: + versionSpec: '5.x' + + - name: Determine Version + id: gitversion + uses: gittools/actions/gitversion/execute@v0.9.9 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + with: + install: true + + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + file: docker/server/Dockerfile + push: true + tags: ghcr.io/${{ github.repository }}:${{ steps.gitversion.outputs.semVer }} + + - name: Image digest + run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/.github/workflows/build-ubuntu.yml b/.github/workflows/build-ubuntu.yml index 3611c7829fc..451307d2183 100644 --- a/.github/workflows/build-ubuntu.yml +++ b/.github/workflows/build-ubuntu.yml @@ -97,3 +97,4 @@ jobs: !${{ github.workspace }}/cmake/ !${{ github.workspace }}/sonar-project.properties !${{ github.workspace }}/Jenkinsfile + !${{ github.workspace }}/GitVersion.yml diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index f22f914e36a..ff2b4766501 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -68,7 +68,7 @@ jobs: - name: Create and Upload Full Datapack uses: actions/upload-artifact@v2 with: - name: canary-full-${{ matrix.os }}-${{ matrix.buildtype }}-${{ github.sha }} + name: canary-full-${{ matrix.os }}-${{ matrix.buildtype }}-${{ steps.gitversion.outputs.semVer }} path: | ${{ github.workspace }} !${{ github.workspace }}/build/ @@ -84,10 +84,11 @@ jobs: !${{ github.workspace }}/cmake/ !${{ github.workspace }}/sonar-project.properties !${{ github.workspace }}/Jenkinsfile + !${{ github.workspace }}/GitVersion.yml - name: Create and Upload Server Only uses: actions/upload-artifact@v2 with: - name: canary-server-only-${{ matrix.os }}-${{ matrix.buildtype }}-${{ github.sha }} + name: canary-server-only-${{ matrix.os }}-${{ matrix.buildtype }}-${{ steps.gitversion.outputs.semVer }} path: | ${{ github.workspace }}/build/bin/ diff --git a/GitVersion.yml b/GitVersion.yml new file mode 100644 index 00000000000..470f5629892 --- /dev/null +++ b/GitVersion.yml @@ -0,0 +1,7 @@ +--- +assembly-versioning-scheme: MajorMinorPatchTag +mode: ContinuousDelivery +branches: {} +ignore: + sha: [] +merge-message-formats: {} diff --git a/src/lua/scripts/lua_environment.cpp b/src/lua/scripts/lua_environment.cpp index 8712bf746a2..0c441512ce1 100644 --- a/src/lua/scripts/lua_environment.cpp +++ b/src/lua/scripts/lua_environment.cpp @@ -31,7 +31,9 @@ LuaEnvironment::LuaEnvironment(): LuaScriptInterface("Main Interface") {} LuaEnvironment::~LuaEnvironment() { - delete testInterface; + if (!testInterface) { + delete testInterface; + } closeState(); }