diff options
author | Jan Niklas Hasse <jhasse@bixense.com> | 2022-10-23 12:10:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-23 12:10:02 +0200 |
commit | d21682397bc4c4ab84ae960c8c9f3129d461fefc (patch) | |
tree | d37de8da837f48ab4f056bdbe30502848d266a99 | |
parent | ffb5ec277475d60d7bd2e9ae23505d6505606f0a (diff) | |
parent | b39e5d7e5d782e1d1c00f24d2318b5aed1521d4a (diff) | |
download | ninja-d21682397bc4c4ab84ae960c8c9f3129d461fefc.tar.gz |
Merge pull request #2201 from martin-g/release-linux-aarch64
Add build job for Linux ARM64
-rw-r--r-- | .github/workflows/linux.yml | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 3c93e00..57a569e 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -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/upload-release-asset@v1.0.1 + 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 |