Skip to content

build-daqingest-rhel7 #51

build-daqingest-rhel7

build-daqingest-rhel7 #51

Workflow file for this run

name: build-daqingest-rhel7
on:
push:
tags:
- buildaction
workflow_dispatch:
inputs:
flags:
description: Additional flags
default: ""
required: false
deprecationMessage: Not supported
# debug:
# description: Debug symbols
# type: choice
# options:
# - Simple
# - Detailed
# default: Detailed
# release:
# description: Package
# type: boolean
# default: true
# other:
# description: Other
# type: environment
# required: false
jobs:
build-daqbuffer-job:
runs-on: ubuntu-latest
container:
image: ugnvc/psi:daqbuild.0.0.1
# credentials:
# username: ${{ github.actor }}
# password: ${{ secrets.github_token }}
env:
PATH: /root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
RUSTUP_HOME: /root/.rustup
CARGO_HOME: /root/.cargo
# ports:
# - 3456
steps:
# - run: find /github -type f
# - run: cat /github/workflow/event.json
# - run: ls -la /root
- run: ls -la /
- run: ls -la /__w
- run: git --version
- run: rustc --version
- run: cargo --version
- run: python --version
- run: python -c 'import json; print(json)'
- run: mkdir /build
# - run: "echo Flags: ${{ github.event.inputs.flags }}"
# - run: echo $HOME
# - run: echo $PATH
# - run: echo $GITHUB_WORKSPACE
# - run: /usr/bin/df -h
# - run: id
# - run: pwd
- run: echo GITHUB_WORKSPACE "$GITHUB_WORKSPACE"
- run: echo RUNNER_WORKSPACE "$RUNNER_WORKSPACE"
- run: echo github.workspace ${{github.workspace}}
- run: echo runner.workspace ${{runner.workspace}}
- run: echo "gh=$GITHUB_WORKSPACE" >> "$GITHUB_OUTPUT"
id: wdset
- run: find "$GITHUB_WORKSPACE"
# - uses: actions/checkout@v4
# with:
# repository: paulscherrerinstitute/daqbuffer.git
# ref: dev
# path: build
# - uses: actions/checkout@v4
# with:
# repository: paulscherrerinstitute/daqingest.git
# path: build
- run: mkdir -p build
working-directory: ${{steps.wdset.outputs.gh}}
- run: git clone --branch dev https://github.com/paulscherrerinstitute/daqbuffer.git
working-directory: ${{steps.wdset.outputs.gh}}/build
- run: git clone --branch dev https://github.com/paulscherrerinstitute/daqingest.git
working-directory: ${{steps.wdset.outputs.gh}}/build
# - run: ls -la $GITHUB_WORKSPACE
# - run: find $GITHUB_WORKSPACE -type f -and \( -name \*.rs -or -name \*.toml \)
# - run: find ${{steps.wdset.outputs.gh}} -type f -and \( -name \*.rs -or -name \*.toml \)
# working-directory: ${{steps.wdset.outputs.gh}}/build
- run: mkdir -p target/release && cp /usr/bin/cat target/release/daqingest
working-directory: ${{steps.wdset.outputs.gh}}/build/daqingest/
if: false
- run: cargo build --release
working-directory: ${{steps.wdset.outputs.gh}}/build/daqingest
- run: ls -l
working-directory: ${{steps.wdset.outputs.gh}}/build/daqingest/target/release
- run: ./daqingest version
working-directory: ${{steps.wdset.outputs.gh}}/build/daqingest/target/release
- run: echo "daqingest_version=0.0.0-alpha.00" >> "$GITHUB_OUTPUT"
id: daqingest_version_set
if: false
- run: echo $(${{steps.wdset.outputs.gh}}/build/daqingest/target/release/daqingest version) > daqver && echo "daqingest_version=$(cat daqver)" >> "$GITHUB_OUTPUT" && echo "DAQVER=$(cat daqver)" >> "$GITHUB_ENV"
id: daqingest_version_set
- run: echo version: TT$(cat daqver)TT

Check failure on line 101 in .github/workflows/build-rhel7.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build-rhel7.yml

Invalid workflow file

You have an error in your yaml syntax on line 101
- run: "echo 'version: [${{steps.daqingest_version_set.outputs.daqingest_version}}]'"
- run: "echo 'version: [${{env.DAQVER}}]'"
- run: "mkdir daqingest-${{steps.daqingest_version_set.outputs.daqingest_version}}-amd64-rhel7"
- run: "cp ${{steps.wdset.outputs.gh}}/build/daqingest/target/release/daqingest daqingest-${{steps.daqingest_version_set.outputs.daqingest_version}}-amd64-rhel7/daqingest"
- run: "tar -czf daqingest-${{steps.daqingest_version_set.outputs.daqingest_version}}-amd64-rhel7.tar.gz daqingest-${{steps.daqingest_version_set.outputs.daqingest_version}}-amd64-rhel7"
- uses: actions/upload-artifact@v3
with:
name: daqingest-${{steps.daqingest_version_set.outputs.daqingest_version}}
path: ${{steps.wdset.outputs.gh}}/build/daqingest/target/release/daqingest
- run: echo "{\"tag_name\":\"buildaction\", \"name\":\"daqingest-${{steps.daqingest_version_set.outputs.daqingest_version}}\", \"draft\":true, \"prerelease\":true}" > create-rel.json
- run: "curl -v -o rel.json -L -X POST -H content-type:application/json -H 'accept:application/vnd.github+json' -H 'authorization:bearer ${{secrets.github_token}}' -H x-github-api-version:2022-11-28 -T create-rel.json https://api.github.com/repos/paulscherrerinstitute/daqingest/releases"
- run: cat rel.json
- run: "RELID=$(python -c 'import json; x=json.load(open(\"rel.json\")); print(x[\"id\"])') && curl -v -o relass.json -L -X POST -H content-type:application/octet-stream -H 'accept:application/vnd.github+json' -H 'authorization:Bearer ${{secrets.github_token}}' -H x-github-api-version:2022-11-28 -T ${{steps.wdset.outputs.gh}}/build/daqingest/target/release/daqingest https://uploads.github.com/repos/paulscherrerinstitute/daqingest/releases/$RELID/assets?name=daqingest-${{steps.daqingest_version_set.outputs.daqingest_version}}-amd64-rhel7"
if: false
- run: "RELID=$(python -c 'import json; x=json.load(open(\"rel.json\")); print(x[\"id\"])') && curl -v -o relass.json -L -X POST -H content-type:application/octet-stream -H 'accept:application/vnd.github+json' -H 'authorization:Bearer ${{secrets.github_token}}' -H x-github-api-version:2022-11-28 -T daqingest-${{steps.daqingest_version_set.outputs.daqingest_version}}-amd64-rhel7.tar.gz https://uploads.github.com/repos/paulscherrerinstitute/daqingest/releases/$RELID/assets?name=daqingest-${{steps.daqingest_version_set.outputs.daqingest_version}}-amd64-rhel7.tar.gz"
- run: cat relass.json