aarch64 CI test #48
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 --output type=docker -t gprofiler | |
- 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.10.11" | |
steps: | |
# - name: check python installation | |
# run: python3 --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 | |
- name: Add to PATH | |
shell: bash | |
run: | | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Check user's directory to path | |
run: echo $PATH | |
- name: Check user's directory to path | |
run: echo $GITHUB_PATH | |
- name: test1 | |
run: which pip | |
- name: test1 | |
run: sudo which pip | |
- name: test3 | |
run: which python3 | |
- name: test4 | |
run: sudo which python3 | |
- name: test5 | |
run: python3 -c 'import site; print(site.getsitepackages())' | |
- name: test6 | |
run: sudo python3 -c 'import site; print(site.getsitepackages())' | |
# TODO: Add docker layer caching when GitHub Actions cache is stabilized and works good with "satackey/[email protected]" | |
- name: Run gProfiler tests | |
run: ./tests/test.sh --ignore=tests/test_executable.py |