forked from ninja-build/ninja
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ninja-build#2201 from martin-g/release-linux-aarch64
Add build job for Linux ARM64
- Loading branch information
Showing
1 changed file
with
60 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -147,3 +147,63 @@ jobs: | |
./ninja_test --gtest_filter=-SubprocessTest.SetWithLots | ||
python3 misc/ninja_syntax_test.py | ||
./misc/output_test.py | ||
build-aarch64: | ||
name: Build Linux ARM64 | ||
runs-on: [ubuntu-latest] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build | ||
uses: uraimo/run-on-arch-action@v2 | ||
with: | ||
arch: aarch64 | ||
distro: ubuntu18.04 | ||
githubToken: ${{ github.token }} | ||
dockerRunArgs: | | ||
--volume "${PWD}:/ninja" | ||
install: | | ||
apt-get update -q -y | ||
apt-get install -q -y make gcc g++ libasan5 clang-tools curl p7zip-full file | ||
run: | | ||
set -x | ||
cd /ninja | ||
# INSTALL CMAKE | ||
CMAKE_VERSION=3.23.4 | ||
curl -L -O https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-aarch64.sh | ||
chmod +x cmake-${CMAKE_VERSION}-Linux-aarch64.sh | ||
./cmake-${CMAKE_VERSION}-Linux-aarch64.sh --skip-license --prefix=/usr/local | ||
# BUILD | ||
cmake -DCMAKE_BUILD_TYPE=Release -B release-build | ||
cmake --build release-build --parallel --config Release | ||
strip release-build/ninja | ||
file release-build/ninja | ||
# TEST | ||
pushd release-build | ||
./ninja_test | ||
popd | ||
# CREATE ARCHIVE | ||
mkdir artifact | ||
7z a artifact/ninja-linux-aarch64.zip ./release-build/ninja | ||
# Upload ninja binary archive as an artifact | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: ninja-binary-archives | ||
path: artifact | ||
|
||
- name: Upload release asset | ||
if: github.event.action == 'published' | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ./artifact/ninja-linux-aarch64.zip | ||
asset_name: ninja-linux-aarch64.zip | ||
asset_content_type: application/zip |