Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #1946
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: build | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled] | |
push: | |
branches: [master] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
bob_key_size: [8, 16] | |
env: | |
TARGET: "x86_64-unknown-linux-musl" | |
BUILD_PROFILE: "release" | |
steps: | |
- name: Checks-out repository | |
uses: actions/checkout@v2 | |
- name: Set env variables and install packages | |
run: | | |
echo "BOB_COMMIT_HASH=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_ENV | |
echo "BOB_KEY_SIZE=${{ matrix.bob_key_size }}" >> $GITHUB_ENV | |
sudo apt-get update && sudo apt-get install -y --no-install-recommends musl-tools | |
- name: Install latest stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: ${{ env.TARGET }} | |
default: true | |
- name: Estimate output binaries directory | |
run: | | |
echo "BUILD_PROFILE_DIR=$(case "$BUILD_PROFILE" in\ | |
("dev") echo "debug";;\ | |
("test") echo "debug";;\ | |
("bench") echo "release";;\ | |
(*) echo "$BUILD_PROFILE";;\ | |
esac)" >> $GITHUB_ENV | |
- name: Output estimated working-directory | |
run: echo ${{ env.BUILD_PROFILE_DIR }} | |
- name: Build release | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --profile=${{ env.BUILD_PROFILE }} --target=${{ env.TARGET }} | |
- name: Build release with async io | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --features async-io --profile=${{ env.BUILD_PROFILE }} --target=${{ env.TARGET }} | |
- name: Check bobd version | |
run: target/${{ env.TARGET }}/${{ env.BUILD_PROFILE_DIR }}/bobd --version | |
build-alpine-image: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checks-out repository | |
uses: actions/checkout@v2 | |
- name: Set env | |
run: | | |
echo "BOB_COMMIT_HASH=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_ENV | |
- name: Build alpine image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: dockerfiles/alpine/Dockerfile | |
build-args: BOB_COMMIT_HASH=${BOB_COMMIT_HASH} | |
build-ubuntu-image: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checks-out repository | |
uses: actions/checkout@v2 | |
- name: Set env | |
run: | | |
echo "BOB_COMMIT_HASH=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_ENV | |
- name: Build ubuntu image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: dockerfiles/ubuntu/Dockerfile | |
build-args: BOB_COMMIT_HASH=${BOB_COMMIT_HASH} |