Resolve #884 #690
Workflow file for this run
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: 'Linux AArch64' | |
on: push | |
jobs: | |
linux-sdk: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8, 3.9, '3.10', '3.11'] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Get Date | |
id: get-date | |
run: | | |
echo "::set-output name=date::$(/bin/date -u "+%Y-%m-%d-%H;%M;%S")" | |
shell: bash | |
- name: ccache cache files | |
uses: actions/cache@v3 | |
with: | |
path: ~/.ccache | |
key: linux-aarch64-${{ runner.os }}-${{ steps.get-date.outputs.date }} | |
restore-keys: | | |
linux-aarch64-${{ runner.os }}- | |
- name: Build SDK | |
if: matrix.python-version == '3.9' | |
shell: bash | |
run: | | |
docker run \ | |
-e CCACHE_COMPRESS=1 \ | |
-e CCACHE_MAXSIZE=10.0G \ | |
-e CCACHE_CPP2=1 \ | |
-e CCACHE_DIR=/ccache \ | |
-v $GITHUB_WORKSPACE:/work \ | |
-v $HOME/.ccache:/ccache \ | |
--rm liefproject/manylinux2014-aarch64 bash /work/scripts/docker/linux-aarch64.sh | |
- name: Build Python ${{ matrix.python-version }} wheel | |
shell: bash | |
env: | |
PYTHON_VERSION: ${{ matrix.python-version }} | |
run: | | |
PYTHON_VERSION2=$(echo "${PYTHON_VERSION}" | sed 's/\.//') # Transform 3.8 -> 38 | |
docker run \ | |
-e CCACHE_COMPRESS=1 \ | |
-e CCACHE_MAXSIZE=10.0G \ | |
-e CCACHE_CPP2=1 \ | |
-e CCACHE_DIR=/ccache \ | |
-e PYTHON_BINARY=/opt/python/cp${PYTHON_VERSION2}-cp${PYTHON_VERSION2}/bin/python${PYTHON_VERSION} \ | |
-v $GITHUB_WORKSPACE:/work \ | |
-v $HOME/.ccache:/ccache \ | |
--rm liefproject/manylinux2014-aarch64 bash /work/scripts/docker/manylinux2014-aarch64.sh | |
- name: 'Upload SDK Artifact' | |
if: matrix.python-version == '3.9' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: linux-aarch64-sdk | |
path: build/*.tar.gz | |
retention-days: 3 | |
- name: 'Upload Python Wheel Artifact - ${{ matrix.python-version }}' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: linux-aarch64-wheel-${{ matrix.python-version }} | |
path: dist/*.whl | |
retention-days: 3 | |
- name: Deploy | |
env: | |
LIEF_S3_KEY: ${{ secrets.LIEF_S3_KEY }} | |
LIEF_S3_SECRET: ${{ secrets.LIEF_S3_SECRET }} | |
shell: bash | |
run: | | |
docker run \ | |
-v $GITHUB_WORKSPACE:/src \ | |
-e GITHUB_ACTIONS="true" \ | |
-e GITHUB_WORKSPACE=$GITHUB_WORKSPACE \ | |
-e GITHUB_REF=$GITHUB_REF \ | |
-e GITHUB_REPOSITORY=$GITHUB_REPOSITORY \ | |
-e LIEF_S3_KEY=$LIEF_S3_KEY \ | |
-e LIEF_S3_SECRET=$LIEF_S3_SECRET \ | |
--rm \ | |
liefproject/deploy python3 /src/.github/deploy.py | |