tests: aarch64: Run in CI #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint, build gProfiler container and run tests on aarch64 | |
on: pull_request | |
jobs: | |
build-container-aarch64: | |
runs-on: | |
- self-hosted | |
- public | |
- ARM64 | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
# the tests need the gprofiler image built (from Dockerfile). I run it separately here, because "docker build" prints the build logs | |
# more nicely. the tests will then be able to use the built image. | |
- name: Build gProfiler image | |
run: ./scripts/build_aarch64_container.sh | |
- name: Export gProfiler image | |
run: mkdir -p output && docker image save gprofiler > output/gprofiler.img | |
- name: Upload the image artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: gprofiler.img | |
path: output/ | |
retention-days: 1 | |
test: | |
needs: build-container-aarch64 | |
runs-on: | |
- self-hosted | |
- public | |
- ARM64 | |
strategy: | |
fail-fast: false # helps detecting flakiness / errors specific to one Python version | |
matrix: | |
python-version: | |
- "3.8" | |
- "3.9" | |
- "3.10.0" # see https://github.com/Granulate/gprofiler/issues/502, we need 3.10.0, others fail PyPerf tests. | |
steps: | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: '8.0.275' | |
java-package: jdk | |
architecture: aarch64 | |
- name: Install Node.JS | |
uses: actions/setup-node@v2 | |
with: | |
# same version as used in tests/containers/nodejs/Dockerfile | |
node-version: 10.x | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Download the executable from previous job | |
uses: actions/download-artifact@v2 | |
with: | |
name: gprofiler.img | |
path: output/ | |
# used for next step (Copy resources ...) and also used in the tests themselves. | |
- name: Import gProfiler image | |
run: docker image load < output/gprofiler.img | |
- name: Copy resources from gProfiler image | |
run: ./scripts/copy_resources_from_image.sh gprofiler | |
# TODO: Add docker layer caching when GitHub Actions cache is stabilized and works good with "satackey/[email protected]" | |
- name: Run gProfiler tests | |
run: NO_APT_INSTALL=1 ./tests/test.sh --ignore=tests/test_executable.py |