Skip to content
This repository has been archived by the owner on Sep 7, 2024. It is now read-only.

[skip ci] Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #138

[skip ci] Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows

[skip ci] Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #138

Workflow file for this run

name: Build
on:
push:
branches:
- master
- gake
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Set up Git repository
uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt-get install -y cmake make openssl
- name: Compile and build binaries
run: bash ./build.sh
- name: Archive binaries
uses: actions/upload-artifact@v4
with:
name: binaries
path: |
./build/ref/test_gake*
./build/avx2/test_gake*
retention-days: 7
if-no-files-found: error
tests:
runs-on: self-hosted
needs: build
timeout-minutes: 0
steps:
- name: Set up Git repository
uses: actions/checkout@v4
- name: Download dependencies
run: sudo apt-get install -y python3 virtualenv
- name: Download all workflow run artifacts
uses: actions/download-artifact@v4.1.7
- name: Run tests
run: |
mkdir -p results
mv binaries build
chmod +x build/ref/*
chmod +x build/avx2/*
virtualenv --python=python3 venv
source venv/bin/activate
pip install -r graphs/requirements.txt
python graphs/generate_results.py graphs/config.yaml
python graphs/generate_graphics.py graphs/config.yaml
- name: Archive results
uses: actions/upload-artifact@v2
with:
name: results
path: ./results/*
retention-days: 7
release:
runs-on: ubuntu-20.04
needs: tests
steps:
- name: Set up Git repository
uses: actions/checkout@v4
- name: Download all workflow run artifacts
uses: actions/download-artifact@v4.1.7
- name: Set release name
id: version
run: |
DATE=$(date +'%Y%m%d%H%M%S')
HASH=$(echo -e ${GITHUB_SHA} | cut -c1-8)
EVENT=${GITHUB_EVENT_NAME}
if [ "$EVENT" = "pull_request" ]; then
BRANCH=${GITHUB_HEAD_REF}
else
BRANCH=${GITHUB_REF##*/}
fi
if [ "$BRANCH" = "master" ]; then
VERSION="$DATE.$HASH"
else
VERSION="$DATE.$HASH.$BRANCH"
fi
echo "Version: $VERSION"
echo "::set-output name=version::$(echo v.$VERSION)"
- name: Upload artifacts
run: |
mv binaries GAKE
zip -r GAKE.zip GAKE
zip -r results.zip results
set -x
assets=()
for asset in "GAKE.zip" results.zip; do
assets+=("-a" "$asset")
done
hub release create "${assets[@]}" -m "${{ steps.version.outputs.version }}" "${{ steps.version.outputs.version }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}