2021-09-23 21:27:05 +02:00
|
|
|
name: Build and test with docker
|
|
|
|
|
|
|
|
on: [ push, pull_request ]
|
|
|
|
|
|
|
|
jobs:
|
2021-09-23 22:01:34 +02:00
|
|
|
compile:
|
2021-09-23 21:27:05 +02:00
|
|
|
runs-on: ${{ matrix.host }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
max-parallel: 3
|
|
|
|
matrix:
|
|
|
|
host: [
|
|
|
|
"ubuntu-latest",
|
|
|
|
#"macos-10.15",
|
|
|
|
]
|
|
|
|
config:
|
|
|
|
- {
|
|
|
|
name: "armhf Release",
|
2021-09-23 22:04:08 +02:00
|
|
|
arch: "armhf"
|
2021-09-23 21:27:05 +02:00
|
|
|
}
|
|
|
|
- {
|
|
|
|
name: "amd64 Release",
|
2021-09-23 22:04:08 +02:00
|
|
|
arch: "amd64"
|
2021-09-23 21:27:05 +02:00
|
|
|
}
|
2021-09-23 22:01:34 +02:00
|
|
|
|
2021-09-23 22:25:03 +02:00
|
|
|
name: 'Build and Upload release: ${{ matrix.config.name }}'
|
2021-09-23 22:01:34 +02:00
|
|
|
steps:
|
2021-09-23 22:25:03 +02:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
-
|
|
|
|
name: Build the Docker image
|
|
|
|
run: docker build -t aasdk_builder --file buildenv/Dockerfile .
|
2021-09-23 22:01:34 +02:00
|
|
|
-
|
|
|
|
name: 'Build ${{ matrix.config.arch }} Debian package'
|
2021-09-23 22:25:03 +02:00
|
|
|
run: docker run -v "${PWD}/release":/release aasdk_builder:latest ${{ matrix.config.arch }}
|
|
|
|
-
|
|
|
|
name: Get Name of Artifact
|
|
|
|
id: get-artifact-name
|
|
|
|
run: |
|
|
|
|
ls -hla
|
|
|
|
ARTIFACT_PATHNAME=$(ls ./release/*.deb | head -n 1)
|
|
|
|
ARTIFACT_NAME=$(basename $ARTIFACT_PATHNAME)
|
|
|
|
echo ::set-output name=artifact_filename::${ARTIFACT_NAME}
|
|
|
|
echo ::set-output name=artifact_path::${ARTIFACT_PATHNAME}
|
|
|
|
-
|
|
|
|
name: Upload build artifacts
|
|
|
|
id: upload_deploy
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: ${{ steps.get-artifact-name.outputs.artifact_filename }}
|
|
|
|
path: |
|
|
|
|
${{ steps.get-artifact-name.outputs.artifact_path }}
|