mirror of
https://github.com/brain-hackers/cegcc-build.git
synced 2024-11-01 07:48:03 +09:00
Add aarch64 build and upload
This commit is contained in:
parent
be52ae0cce
commit
ed69788e81
42
.github/workflows/build.yml
vendored
42
.github/workflows/build.yml
vendored
@ -46,29 +46,51 @@ jobs:
|
|||||||
run: sudo rm /etc/apt/sources.list.d/github_git-lfs.*
|
run: sudo rm /etc/apt/sources.list.d/github_git-lfs.*
|
||||||
- name: Install deps
|
- name: Install deps
|
||||||
run: |
|
run: |
|
||||||
|
sudo dpkg --add-architecture arm64
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install build-essential bison flex m4 libgmp-dev libmpc-dev libmpfr-dev
|
sudo apt install build-essential bison flex m4 libgmp-dev libmpc-dev libmpfr-dev libgmp-dev:arm64 libmpc-dev:arm64 libmpfr-dev:arm64
|
||||||
- name: Build cegcc
|
- name: Build cegcc for x86
|
||||||
run: |
|
run: |
|
||||||
|
export DIR=$(pwd)
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
../build.sh -j4
|
../build.sh -j4
|
||||||
- name: Setup releases
|
cd /opt
|
||||||
id: release_name
|
zip -r $DIR/cegcc-x86.zip cegcc
|
||||||
|
rm -rf cegcc
|
||||||
|
- name: Build cegcc for aarch64
|
||||||
run: |
|
run: |
|
||||||
export DIR=$(pwd)
|
export DIR=$(pwd)
|
||||||
ls -l /opt/cegcc/
|
mkdir cross
|
||||||
|
cd cross
|
||||||
|
find /usr/bin/aarch64-linux-gnu-* | sed 's+/usr/bin/aarch64-linux-gnu-++g' | xargs -n1 -I{} ln -s /usr/bin/aarch64-linux-gnu-{} {}
|
||||||
|
export PATH=$(pwd):$PATH
|
||||||
|
cd ..
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
../build.sh -j4 --host=aarch64-linux-gnu
|
||||||
cd /opt
|
cd /opt
|
||||||
zip -r $DIR/cegcc.zip cegcc
|
zip -r $DIR/cegcc-aarch64.zip cegcc
|
||||||
- name: Generate archive name
|
- name: Generate archive name
|
||||||
id: archive_name
|
id: archive_name
|
||||||
run: echo ::set-output name=name::cegcc-${GITHUB_REF/refs\/*s\//}
|
run: |
|
||||||
- name: Upload cegcc.zip
|
echo ::set-output name=name_x86::cegcc-x86-${GITHUB_REF/refs\/*s\//}
|
||||||
|
echo ::set-output name=name_aarch64::cegcc-aarch64-${GITHUB_REF/refs\/*s\//}
|
||||||
|
- name: Upload cegcc-x86.zip
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
||||||
asset_path: cegcc.zip
|
asset_path: cegcc-x86.zip
|
||||||
asset_name: ${{ steps.archive_name.outputs.name }}.zip
|
asset_name: ${{ steps.archive_name.outputs.name_x86 }}.zip
|
||||||
|
asset_content_type: application/zip
|
||||||
|
- name: Upload cegcc-aarch64.zip
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
||||||
|
asset_path: cegcc-aarch64.zip
|
||||||
|
asset_name: ${{ steps.archive_name.outputs.name_aarch64 }}.zip
|
||||||
asset_content_type: application/zip
|
asset_content_type: application/zip
|
||||||
|
Loading…
Reference in New Issue
Block a user