Update mercurial version #718
Workflow file for this run
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
name: docker-build | |
on: | |
push: | |
branches: [ develop, master ] | |
pull_request: | |
branches: [ develop ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
# As of 2022-08-16, we build LfMerge for LCM DB version 72 only (and will expand this to include any future DbVersions) | |
strategy: | |
matrix: | |
dbversion: [7000072] | |
distro: [ 'bionic' ] | |
steps: | |
- name: Check out current branch | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # All history for all tags and branches, since version number script needs that | |
- name: Calculate version number | |
id: version | |
env: | |
BUILD_NUMBER: ${{ github.run_number }} | |
DbVersion: ${{ matrix.dbversion }} | |
run: docker/scripts/get-version-number.sh | |
- name: Save current version number to an output | |
id: output_version_number | |
run: | | |
echo Will tag ${{matrix.dbversion}} with ${TAG} | |
echo "TagFor${{matrix.dbversion}}=${TAG}" >> $GITHUB_OUTPUT | |
echo "VersionFor${{matrix.dbversion}}=${VERSION}" >> $GITHUB_OUTPUT | |
env: | |
TAG: v${{ steps.version.outputs.MsBuildVersion }} | |
VERSION: ${{ steps.version.outputs.MsBuildVersion }} | |
- name: Set up buildx for Docker | |
uses: docker/[email protected] | |
- name: Find current UID | |
id: uid | |
run: echo "uid=$(id -u)" >> $GITHUB_OUTPUT | |
- name: Output diagnostics | |
run: | | |
echo "the developer is = ${{steps.uid.outputs.developer}}" | |
- name: Build DBVersion-specific Docker image | |
uses: docker/[email protected] | |
with: | |
push: false | |
load: true | |
tags: lfmerge-build-${{matrix.dbversion}} | |
context: . | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
build-args: | | |
DbVersion=${{matrix.dbversion}} | |
BUILDER_UID=${{steps.uid.outputs.uid}} | |
- name: Run docker image ls to verify build | |
run: docker image ls | |
- name: Run the build container | |
env: | |
BUILD_NUMBER: ${{ github.run_number }} | |
DebPackageVersion: ${{ steps.version.outputs.DebPackageVersion }} | |
MsBuildVersion: ${{ steps.version.outputs.MsBuildVersion }} | |
MajorMinorPatch: ${{ steps.version.outputs.MajorMinorPatch }} | |
AssemblySemVer: ${{ steps.version.outputs.AssemblySemVer }} | |
AssemblySemFileVer: ${{ steps.version.outputs.AssemblySemFileVer }} | |
InformationalVersion: ${{ steps.version.outputs.InformationalVersion }} | |
run: docker run --mount type=bind,source="$(pwd)",target=/home/builder/repo --env "BUILD_NUMBER=${BUILD_NUMBER}" --env "DebPackageVersion=${DebPackageVersion}" --env "Version=${MsBuildVersion}" --env "MajorMinorPatch=${MajorMinorPatch}" --env "AssemblyVersion=${AssemblySemVer}" --env "FileVersion=${AssemblySemFileVer}" --env "InformationalVersion=${InformationalVersion}" --name tmp-lfmerge-build-${{matrix.dbversion}} lfmerge-build-${{matrix.dbversion}} | |
- name: Report test results | |
uses: EnricoMi/[email protected] | |
if: always() | |
with: | |
nunit_files: "**/TestResults/TestResults.xml" | |
- name: Compress tarball images for faster uploads | |
run: time (tar cf - tarball | gzip -c9 > tarball.tar.gz) | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: lfmerge-tarball | |
path: tarball.tar.gz | |
outputs: | |
MsBuildVersion: ${{ steps.output_version_number.outputs.VersionFor7000072 }} | |
TagFor7000072: ${{ steps.output_version_number.outputs.TagFor7000072 }} | |
release: | |
needs: build | |
uses: ./.github/workflows/release.yml | |
with: | |
MsBuildVersion: ${{ needs.build.outputs.MsBuildVersion }} | |
TagFor7000072: ${{ needs.build.outputs.TagFor7000072 }} |