Skip to content

Commit

Permalink
chore: Alpine build (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
michalbali256 authored Mar 6, 2020
1 parent 40d6d03 commit 90d658e
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/Sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ jobs:
run: cd build/bin && llvm-cov-8 show -instr-profile hlasm_profile library_test server_test > coverage.txt
- name: Pull request setting
if: github.event_name == 'pull_request'
run: echo ::set-env name=PR_NUMBER::-Dsonar.pullrequest.key=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")
run: |
echo ::set-env name=PR_NUMBER::-Dsonar.pullrequest.key=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")
echo ::set-env name=HEAD_BRANCH::-Dsonar.pullrequest.branch=${{ github.head_ref }}
- name: Sonar scan
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -87,5 +89,6 @@ jobs:
-Dsonar.cfamily.llvm-cov.reportPath=build/bin/coverage.txt
-Dsonar.cfamily.cache.enabled=false
-Dsonar.projectVersion=${{ env.VERSION }}
${{ env.HEAD_BRANCH }}
${{ env.PR_NUMBER }}
52 changes: 52 additions & 0 deletions .github/workflows/alpine.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#
# Copyright (c) 2019 Broadcom.
# The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
#
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Broadcom, Inc. - initial API and implementation
#

name: Alpine build
on:
push:
branches:
- master
- development
pull_request:
branches:
- master
- development
jobs:
alpine-build:
name: Linux language server
runs-on: ubuntu-18.04
container:
image: alpine:3.10

steps:
- uses: actions/checkout@v1
- name: Requirements install
run: apk update && apk add --no-cache linux-headers git g++ cmake util-linux-dev npm ninja pkgconfig openjdk8 maven
- name: Configure
run: mkdir build && cd build && cmake -G Ninja ../
- name: Build
run: cd build && cmake --build .
- name: Test
run: cd build/bin && ./server_test && ./library_test
- name: Get VSIX filename
run: echo ::set-env name=VSIX_FILENAME::$(ls build/bin/*.vsix)
- name: Get version
run: echo ::set-env name=VERSION::$(node -e "console.log(require('./clients/vscode-hlasmplugin/package.json').version)")
- name: Rename VSIX
run: mv ${{ env.VSIX_FILENAME }} hlasm-language-support-alpine-${{ env.VERSION }}.vsix
- name: Upload VSIX
uses: actions/upload-artifact@v1
with:
name: hlasm-language-support-alpine-${{ env.VERSION }}.vsix
path: hlasm-language-support-alpine-${{ env.VERSION }}.vsix

0 comments on commit 90d658e

Please sign in to comment.