aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2022-06-23 16:22:50 -0700
committerGitHub <[email protected]>2022-06-24 01:22:50 +0200
commit2ece54858bc2a93e4f97176f37e9966560cfae41 (patch)
treeb127e29a888a8eeb4c19efcb6f14331d3fd71fd8
parentMake cas storage an hidden implementation detail of CidStore (#130) (diff)
downloadzen-2ece54858bc2a93e4f97176f37e9966560cfae41.tar.xz
zen-2ece54858bc2a93e4f97176f37e9966560cfae41.zip
add macos builds (#133)
* add macos builds * bump timeout to 15 minutes and add timeout to create-release flow * strip -pre suffix from version when running config * fix pre-release check * bump version
-rw-r--r--.github/workflows/create_release.yml76
-rw-r--r--.github/workflows/validate.yml74
-rw-r--r--VERSION.txt2
-rw-r--r--zencore/xmake.lua1
4 files changed, 140 insertions, 13 deletions
diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml
index 0d6baa193..116026b04 100644
--- a/.github/workflows/create_release.yml
+++ b/.github/workflows/create_release.yml
@@ -8,6 +8,7 @@ on:
jobs:
bundle-windows:
runs-on: [self-hosted, windows, x64]
+ timeout-minutes: 15
env:
VCPKG_VERSION: 2022.03.10
@@ -48,6 +49,7 @@ jobs:
bundle-linux:
runs-on: [self-hosted, linux, x64]
+ timeout-minutes: 15
env:
VCPKG_VERSION: 2022.03.10
@@ -90,10 +92,57 @@ jobs:
with:
name: zenserver-linux
path: build/zenserver-linux.zip
-
+
+ bundle-macos:
+ runs-on: [self-hosted, macos, x64]
+ timeout-minutes: 15
+ env:
+ VCPKG_VERSION: 2022.03.10
+
+ steps:
+ - uses: actions/checkout@v2
+
+# - name: Set up GCC 11
+# uses: egor-tensin/setup-gcc@v1
+# with:
+# version: 11
+# platform: x64
+
+ - name: Setup xmake
+ uses: xmake-io/github-action-setup-xmake@v1
+ with:
+ xmake-version: 2.6.4
+
+ - name: Installing vcpkg
+ run: |
+ git clone -b ${{env.VCPKG_VERSION}} --single-branch https://github.com/Microsoft/vcpkg.git .vcpkg
+ cd .vcpkg
+ ./bootstrap-vcpkg.sh
+ cd ..
+
+ - name: Cache vcpkg
+ uses: actions/cache@v2
+ with:
+ path: |
+ ${{ github.workspace }}/.vcpkg/installed
+ key: ${{ runner.os }}-release-${{env.VCPKG_VERSION}}-${{ hashFiles('xmake.lua') }}-x64-v5
+
+ - name: Bundle
+ run: |
+ xmake bundle -v -y
+ env:
+ VCPKG_ROOT: ${{ github.workspace }}/.vcpkg
+
+ - name: Upload zenserver-macos
+ uses: actions/upload-artifact@v3
+ with:
+ name: zenserver-macos
+ path: build/zenserver-macos.zip
+
create-release:
runs-on: [self-hosted, linux, x64]
- needs: [bundle-linux, bundle-windows]
+ timeout-minutes: 5
+ needs: [bundle-linux, bundle-windows, bundle-macos]
steps:
- uses: actions/checkout@v2
@@ -104,20 +153,18 @@ jobs:
name: zenserver-linux
path: linux
+ - name: Download MacOS artifacts
+ uses: actions/download-artifact@v1
+ with:
+ name: zenserver-macos
+ path: macos
+
- name: Download Windows artifacts
uses: actions/download-artifact@v1
with:
name: zenserver-win64
path: win64
- - name: Check prerelease
- id: get-prerelease
- uses: haya14busa/action-cond@v1
- with:
- cond: ${{contains(github.ref, '-pre')}}
- if_true: "true"
- if_false: "false"
-
- name: Extract Version Changes
run: |
sed '1,/^##/!d;/##/d' CHANGELOG.md > CHANGELOG.tmp
@@ -134,6 +181,14 @@ jobs:
with:
path: "VERSION.txt"
+ - name: Check prerelease
+ id: get-prerelease
+ uses: haya14busa/action-cond@v1
+ with:
+ cond: ${{contains(steps.read_version.outputs.contents, '-pre')}}
+ if_true: "true"
+ if_false: "false"
+
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
@@ -148,3 +203,4 @@ jobs:
files: |
linux/zenserver-linux.zip
win64/zenserver-win64.zip
+ macos/zenserver-macos.zip
diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml
index 7ceec353b..1a6cd7ddc 100644
--- a/.github/workflows/validate.yml
+++ b/.github/workflows/validate.yml
@@ -44,7 +44,7 @@ jobs:
needs: cancel-old-build
name: Build & Test Windows
runs-on: [self-hosted, windows, x64]
- timeout-minutes: 10
+ timeout-minutes: 15
strategy:
matrix:
config:
@@ -109,7 +109,7 @@ jobs:
needs: cancel-old-build
name: Build & Test Linux
runs-on: [self-hosted, linux, x64]
- timeout-minutes: 10
+ timeout-minutes: 15
strategy:
matrix:
config:
@@ -174,3 +174,73 @@ jobs:
xmake test -v -y
env:
VCPKG_ROOT: ${{ github.workspace }}/.vcpkg
+
+ macos-build:
+ needs: cancel-old-build
+ name: Build & Test MacOS
+ runs-on: [self-hosted, macos, x64]
+ timeout-minutes: 15
+ strategy:
+ matrix:
+ config:
+ - 'debug'
+ - 'release'
+ arch:
+ - 'x86_64'
+ env:
+ VCPKG_VERSION: 2022.03.10
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+# - name: Set up GCC 11
+# uses: egor-tensin/setup-gcc@v1
+# with:
+# version: 11
+# platform: x64
+
+ - name: Setup xmake
+ uses: xmake-io/github-action-setup-xmake@v1
+ with:
+ xmake-version: 2.6.4
+
+ - name: Installing vcpkg
+ run: |
+ git clone -b ${{env.VCPKG_VERSION}} --single-branch https://github.com/Microsoft/vcpkg.git .vcpkg
+ cd .vcpkg
+ ./bootstrap-vcpkg.sh
+ cd ..
+
+ - name: Cache vcpkg
+ uses: actions/cache@v2
+ with:
+ path: |
+ ${{ github.workspace }}/.vcpkg/installed
+ key: ${{ runner.os }}-${{ matrix.config }}-${{env.VCPKG_VERSION}}-${{ hashFiles('xmake.lua') }}-${{ matrix.arch }}-v5
+
+ - name: Bundle
+ if: ${{ github.ref_name == 'main' && matrix.config == 'release' }}
+ run: |
+ xmake bundle -v -y
+ env:
+ VCPKG_ROOT: ${{ github.workspace }}/.vcpkg
+
+ - name: Upload zenserver-macos
+ if: ${{ github.ref_name == 'main' && matrix.config == 'release' }}
+ uses: actions/upload-artifact@v3
+ with:
+ name: zenserver-macos
+ path: build/zenserver-macos.zip
+
+ - name: Config
+ run: |
+ xmake config -v -y -m ${{ matrix.config }} --arch=${{ matrix.arch }}
+ env:
+ VCPKG_ROOT: ${{ github.workspace }}/.vcpkg
+
+ - name: Build & Test
+ run: |
+ xmake test -v -y
+ env:
+ VCPKG_ROOT: ${{ github.workspace }}/.vcpkg
diff --git a/VERSION.txt b/VERSION.txt
index 0da163cd7..5fadb4704 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -1 +1 @@
-0.1.4-pre2
+0.1.4-pre6 \ No newline at end of file
diff --git a/zencore/xmake.lua b/zencore/xmake.lua
index 3f78be99c..f01c12c86 100644
--- a/zencore/xmake.lua
+++ b/zencore/xmake.lua
@@ -6,6 +6,7 @@ target('zencore')
add_configfiles("include/zencore/config.h.in")
on_load(function (target)
local version = io.readfile("VERSION.txt")
+ version = string.gsub(version,"%-pre.*", "")
target:set("version", version:trim(), {build = "%Y%m%d%H%M"})
end)
set_configdir("include/zencore")