Skip to content

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #78

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #78

Workflow file for this run

name: build-linux
on: [push, pull_request]
jobs:
build:
# Based on requirement by linuxdeployqt
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Install dependencies with apt
run: |
sudo add-apt-repository ppa:beineri/opt-qt-5.15.2-bionic
sudo apt-get update
sudo apt-get install -y cmake libgsl-dev libgl1-mesa-dev qt515base qt515tools qt515svg
- name: Make Qt hash
id: qt-hash
run: |
echo "::set-output name=key::$(/opt/qt515/bin/qmake --version | sha256sum - | cut -c-8)"
- uses: actions/cache@v3
id: cache
with:
path: ${{ github.workspace }}/deps
key: ${{ runner.os }}-${{ steps.qt-hash.outputs.key }}
- name: Build Qt based dependencies (qwt)
if: steps.cache.outputs.cache-hit != 'true'
run: bash contrib/github-action-build-deps-linux.sh
# Here we need to run the build steps within a script because we cannot source the qtvars file
- name: Build Strata
run: bash contrib/github-action-build-strata-linux.sh
- name: Upload Strata artifact
uses: actions/upload-artifact@v2
with:
name: build
path: ${{github.workspace}}/build/dist
retention-days: 5
make-appimage:
runs-on: ubuntu-18.04
needs: [build]
steps:
- uses: actions/checkout@v2
- name: Install dependencies with apt
run: |
sudo add-apt-repository ppa:beineri/opt-qt-5.15.2-bionic
sudo apt-get update
sudo apt-get install -y gsl-bin libgl1-mesa-dev qt515base qt515tools qt515svg
- name: Download artifact
uses: actions/download-artifact@v4.1.7
with:
name: build
path: ${{github.workspace}}/dist
- name: Create Strata AppImage
run: |
# Permissions reset on downloading artifact
chmod +x dist/usr/bin/strata
bash contrib/github-action-make-appimage.sh
- uses: actions/upload-artifact@v3
with:
name: strata appimage
path: ${{ github.workspace }}/Strata-*.AppImage
find-examples:
runs-on: ubuntu-18.04
outputs:
examples: ${{ steps.find-examples.outputs.examples }}
steps:
- uses: actions/checkout@v2
- name: Find examples
# Specifying this id is critical
id: find-examples
working-directory: ${{github.workspace}}/example
run: |
examples=$(ls *.json *.strata | jq -cnR '[inputs | select(length>0)]')
echo "::set-output name=examples::$examples"
test:
runs-on: ubuntu-18.04
needs: [find-examples, build]
strategy:
fail-fast: false
matrix:
example: ${{ fromJson(needs.find-examples.outputs.examples) }}
steps:
- uses: actions/checkout@v2
- name: Install dependencies with apt
run: |
sudo add-apt-repository ppa:beineri/opt-qt-5.15.2-bionic
sudo apt-get update
sudo apt-get install -y gsl-bin libgl1-mesa-dev qt515base qt515tools qt515svg
- name: Download artifact
uses: actions/download-artifact@v4.1.7
with:
name: build
path: ${{github.workspace}}/dist
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
- name: Run example
run: |
# Permissions reset on downloading artifact
chmod +x dist/usr/bin/strata
bash contrib/github-action-run-strata.sh example/${{ matrix.example }}