Skip to content

add return of 'start' option in BinarySearchMass to address issue not… #294

add return of 'start' option in BinarySearchMass to address issue not…

add return of 'start' option in BinarySearchMass to address issue not… #294

Workflow file for this run

name: Build on Linux for ubuntu-20.04
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
release:
types: [ created ]
env:
REGISTRY: ghcr.io
IMAGE_NAME: uwpr/comet
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Build Comet
run: make
- name: Test Comet
run: ./comet.exe -p
- name: Prepare Comet release
run: |
mkdir release && \
cp comet.exe release/comet.linux.exe && \
cp README.md release/README.md
- name: Upload build artificats
uses: actions/upload-artifact@v4
with:
name: comet-linux
path: release/*
- name: Upload binaries to the release
uses: svenstaro/upload-release-action@v2
if: ${{ github.event_name == 'release' }}
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: release/*
overwrite: true
file_glob: true
- name: Build the Docker image
uses: docker/build-push-action@v2
with:
context: .
load: true
tags: ${{ env.IMAGE_NAME }}:test
- name: Test the Docker image
run: docker run --rm ${IMAGE_NAME}:test comet -p
- name: Log in to the GitHub Container Registry
if: ${{ github.event_name == 'release' }}
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for Docker
if: ${{ github.event_name == 'release' }}
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# Note that the image is cached from the test build, so it won't be build a
# second time. Correspondingly, this step only pushes it to the GitHub
# Container Registry.
- name: Push the Docker image to the GHCR
uses: docker/build-push-action@v2
if : ${{ github.event_name == 'release' }}
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}