Skip to content

removed wsdl files from cmakelists.txt #38

removed wsdl files from cmakelists.txt

removed wsdl files from cmakelists.txt #38

Workflow file for this run

name: Build and Package
on:
# workflow_dispatch:
push:
tags:
- '*.*.*'
jobs:
build-Ubuntu20:
# https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2004-Readme.md
runs-on: ubuntu-20.04
steps:
- name: Update virtual machine
run: |
sudo apt-get update -y
sudo apt-get install -y python3 mesa-utils glew-utils python3-numpy v4l-utils python3-pip openssl
sudo apt-get install -y build-essential yasm cmake pkg-config swig libglew-dev mesa-common-dev python3-dev python3-numpy libasound2-dev libssl-dev coreutils freeglut3-dev i965-va-driver libva-dev
- name: Check out code
uses: actions/checkout@v2
- name: Build
uses: ./.github/actions/build
with:
slug: Ubuntu20
build-Ubuntu22:
runs-on: ubuntu-22.04
steps:
- name: Update virtual machine
run: |
sudo apt-get update -y
sudo apt-get install -y python3 mesa-utils glew-utils python3-numpy v4l-utils python3-pip openssl
sudo apt-get install -y build-essential yasm cmake pkg-config swig libglew-dev mesa-common-dev python3-dev python3-numpy libasound2-dev libssl-dev coreutils freeglut3-dev i965-va-driver libva-dev
- name: Check out code
uses: actions/checkout@v2
- name: Build
uses: ./.github/actions/build
with:
slug: Ubuntu22
release:
runs-on: ubuntu-latest
needs: [build-Ubuntu20, build-Ubuntu22]
steps:
# https://github.com/softprops/action-gh-release/blob/master/action.yml
- name: Set env variables
run: |
echo "VER=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
tail -n1 $GITHUB_ENV
- name: Download Ubuntu20 artifact
uses: actions/download-artifact@v3
with:
name: Valkka-${{ env.VER }}-Ubuntu20.deb
path: ${{ github.workspace }}
- name: Download Ubuntu22 artifact
uses: actions/download-artifact@v3
with:
name: Valkka-${{ env.VER }}-Ubuntu22.deb
path: ${{ github.workspace }}
- name: Download Release.txt
uses: actions/download-artifact@v3
with:
name: Release.txt
path: ${{ github.workspace }}
- name: List files
run: ls -1 ${{ github.workspace }}/*
- name: Create a release
uses: softprops/action-gh-release@v1
with:
files: |
${{ github.workspace }}/Valkka-${{ env.VER }}-Ubuntu20.deb
${{ github.workspace }}/Valkka-${{ env.VER }}-Ubuntu22.deb
${{ github.workspace }}/Release.txt
docker-create:
runs-on: ubuntu-latest
needs: [release]
steps:
- name: Update virtual machine
run: |
sudo apt-get update -y
sudo apt-get install -y curl docker
- name: Check version tag
shell: bash
# god'damn trial and error to find out the f-git tag !
# https://docs.github.com/en/actions/learn-github-actions/variables
run: |
echo "VERSION2 = "$GITHUB_REF
echo "VER=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
tail -n1 $GITHUB_ENV
- name: Test environmental variables
shell: bash
run: |
echo "VERSION TAG IS : "$VER
echo "VERSION FROM env.: "${{ env.VER }}
- name: Fetch Dockerfile
shell: bash
run: |
curl https://raw.githubusercontent.com/elsampsa/valkka-core/master/Dockerfile -o Dockerfile
working-directory: ${{ github.workspace }}
- name: Fetch .deb package
shell: bash
run: |
URL="https://github.com/elsampsa/valkka-core/releases/download/${{ env.VER }}/Valkka-${{ env.VER }}-Ubuntu22.deb"
curl -L $URL -o Valkka.deb
working-directory: ${{ github.workspace }}
- name: Build Docker image
shell: bash
run: docker build -t valkka:${{ env.VER }} .
working-directory: ${{ github.workspace }}
- name: Log in to Docker Hub
shell: bash
run: docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push Docker image to Docker Hub
shell: bash
run: |
docker tag valkka:${{ env.VER }} ${{ secrets.DOCKERHUB_USERNAME }}/valkka:${{ env.VER }}
docker push ${{ secrets.DOCKERHUB_USERNAME }}/valkka:${{ env.VER }}
docker tag valkka:${{ env.VER }} ${{ secrets.DOCKERHUB_USERNAME }}/valkka:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/valkka:latest