-
Notifications
You must be signed in to change notification settings - Fork 14
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
4 changed files
with
57 additions
and
41 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,44 @@ | ||
jobs: | ||
- job: ${{ parameters.name }} | ||
timeoutInMinutes: 120 | ||
pool: | ||
vmImage: ${{ parameters.vmImage }} | ||
strategy: | ||
matrix: | ||
musl: | ||
BUILD: musl | ||
maxParallel: 5 | ||
steps: | ||
- bash: echo "##vso[task.setvariable variable=TAG]${BUILD_SOURCEBRANCH##refs/tags/}" | ||
displayName: Set TAG variable | ||
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/') | ||
- script: | | ||
docker image build . -t tldr | ||
# https://github.com/moby/moby/issues/34592#issuecomment-331001595 | ||
CID=$(docker create tldr) | ||
docker cp ${CID}:/app/tldr . | ||
docker rm ${CID} | ||
echo "musl build" | ||
ls | ||
ls -lh ./tldr | ||
cp ./tldr $(Build.ArtifactStagingDirectory) | ||
env: | ||
OS_NAME: ${{ parameters.os }} | ||
displayName: 'Installation ${{parameters.os}} & Test' | ||
- task: ArchiveFiles@2 | ||
inputs: | ||
includeRootFolder: false | ||
archiveType: tar | ||
tarCompression: gz | ||
archiveFile: $(Build.ArtifactStagingDirectory)/tldr-musl-linux-$(TAG).tar.gz | ||
verbose: true | ||
condition: and(startsWith(variables['TAG'], 'v'), eq(variables['DEPLOY'], '1')) | ||
- task: GithubRelease@0 | ||
displayName: Create GitHub Release | ||
inputs: | ||
githubConnection: github.com_psibi | ||
assets: $(Build.ArtifactStagingDirectory)/tldr-linux-$(TAG).tar.gz | ||
assetUploadMode: replace | ||
action: edit | ||
tag: $(TAG) | ||
condition: and(startsWith(variables['TAG'], 'v'), eq(variables['DEPLOY'], '1')) |
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,7 @@ | ||
FROM fpco/alpine-haskell-stack:8.6.5 | ||
|
||
COPY . /app | ||
|
||
RUN cd /app | ||
|
||
RUN env STACK_YAML=/app/stack.yaml stack --system-ghc install --local-bin-path /app --flag tldr:static |
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