-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
88 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
version: v1.0 | ||
name: Linux-x64 | ||
agent: | ||
machine: | ||
type: e1-standard-2 | ||
os_image: ubuntu1804 | ||
blocks: | ||
- name: Upgrade System | ||
dependencies: [] | ||
task: | ||
prologue: | ||
commands: | ||
- checkout | ||
jobs: | ||
- name: Fetch Version 3.18 of CMake | ||
commands: | ||
- ./build-tools/000-upgrade-system/upgrade-cmake.sh | ||
env_vars: | ||
- name: CMAKE_CACHE_STRING | ||
value: cmake-3-18-0 | ||
- name: CMAKE_VERSION | ||
value: 3.18.0 | ||
- name: Build | ||
dependencies: | ||
- Upgrade System | ||
task: | ||
prologue: | ||
commands: | ||
- sem-version cpp 8 | ||
- checkout | ||
jobs: | ||
- name: Configure & Build | ||
commands: | ||
- ./build-tools/001-configure-and-build/configure-and-build.sh | ||
env_vars: | ||
- name: CMAKE_CACHE_STRING | ||
value: cmake-3-18-0 | ||
- name: CMAKE_VERSION | ||
value: 3.18.0 | ||
- name: Publish | ||
dependencies: | ||
- Build | ||
skip: | ||
when: branch != 'master' | ||
task: | ||
jobs: | ||
- name: Publish | ||
commands: | ||
- ./build-tools/002-publish/publish.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env sh | ||
|
||
# Exit if CMake version is already cached | ||
cache has_key "${CMAKE_CACHE_STRING}" && exit 0 | ||
|
||
# Download and extract desired version | ||
wget -q "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz" | ||
tar zxf "cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz" | ||
|
||
# Store the newly downloaded version in the cache | ||
cache store "${CMAKE_CACHE_STRING}" "./cmake-${CMAKE_VERSION}-Linux-x86_64/" |
13 changes: 13 additions & 0 deletions
13
build-tools/001-configure-and-build/configure-and-build.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env sh | ||
|
||
# Restore CMake from cache | ||
cache restore "${CMAKE_CACHE_STRING}" | ||
|
||
# Configure build | ||
"./cmake-${CMAKE_VERSION}-Linux-x86_64/bin/cmake" -B build -DCMAKE_BUILD_TYPE=Release . | ||
|
||
# Build | ||
"./cmake-${CMAKE_VERSION}-Linux-x86_64/bin/cmake" --build build -j 3 | ||
|
||
# Store the built binary as an artifact | ||
artifact push workflow build/wakeup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env sh | ||
|
||
# Fetch the current artifact | ||
artifact pull workflow build/wakeup | ||
|
||
# Create a tar-ball | ||
tar zcf "wakeup-$(build/wakeup --version).tar.gz" build/wakeup | ||
|
||
# Publish the final tar-balled binary | ||
artifact push project "wakeup-$(build/wakeup --version).tar.gz" |