Skip to content

Commit

Permalink
v1.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jhasse committed Apr 11, 2024
2 parents 448ae1c + 1dcebc6 commit 65d0dfc
Show file tree
Hide file tree
Showing 67 changed files with 2,318 additions and 1,046 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
69 changes: 64 additions & 5 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ jobs:
# Upload ninja binary archive as an artifact
- name: Upload artifact
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
with:
name: ninja-binary-archives
path: artifact

- name: Upload release asset
if: github.event.action == 'published'
uses: actions/upload-release-asset@v1.0.1
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand All @@ -83,7 +83,7 @@ jobs:
- name: Install dependencies
run: |
apt update
apt install -y python3-pytest ninja-build clang-tidy python3-pip clang
apt install -y python3-pytest ninja-build clang-tidy python3-pip clang libgtest-dev
pip3 install cmake==3.17.*
- name: Configure (GCC)
run: cmake -Bbuild-gcc -DCMAKE_BUILD_TYPE=Debug -G'Ninja Multi-Config'
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
image: ${{ matrix.image }}
strategy:
matrix:
image: ['ubuntu:14.04', 'ubuntu:16.04', 'ubuntu:18.04']
image: ['ubuntu:20.04', 'ubuntu:22.04', 'ubuntu:24.04']
steps:
- uses: actions/checkout@v2
- name: Install dependencies
Expand All @@ -144,6 +144,65 @@ jobs:
run: |
python3 configure.py --bootstrap
./ninja all
./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@v3
with:
name: ninja-binary-archives
path: artifact

- name: Upload release asset
if: github.event.action == 'published'
uses: actions/upload-release-asset@v1
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
8 changes: 4 additions & 4 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
build:
runs-on: macos-11.0
runs-on: macos-12

steps:
- uses: actions/checkout@v2
Expand All @@ -19,7 +19,7 @@ jobs:
- name: Build ninja
shell: bash
env:
MACOSX_DEPLOYMENT_TARGET: 10.12
MACOSX_DEPLOYMENT_TARGET: 10.15
run: |
cmake -Bbuild -GXcode '-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64'
cmake --build build --config Release
Expand All @@ -36,14 +36,14 @@ jobs:
# Upload ninja binary archive as an artifact
- name: Upload artifact
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
with:
name: ninja-binary-archives
path: artifact

- name: Upload release asset
if: github.event.action == 'published'
uses: actions/upload-release-asset@v1.0.1
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
23 changes: 17 additions & 6 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ jobs:
build:
runs-on: windows-latest

strategy:
fail-fast: false
matrix:
include:
- arch: 'x64'
suffix: ''
- arch: 'arm64'
suffix: 'arm64'

steps:
- uses: actions/checkout@v2

Expand All @@ -19,38 +28,40 @@ jobs:
- name: Build ninja
shell: bash
run: |
cmake -Bbuild
cmake -Bbuild -A ${{ matrix.arch }}
cmake --build build --parallel --config Debug
cmake --build build --parallel --config Release
- name: Test ninja (Debug)
if: matrix.arch != 'arm64'
run: .\ninja_test.exe
working-directory: build/Debug

- name: Test ninja (Release)
if: matrix.arch != 'arm64'
run: .\ninja_test.exe
working-directory: build/Release

- name: Create ninja archive
shell: bash
run: |
mkdir artifact
7z a artifact/ninja-win.zip ./build/Release/ninja.exe
7z a artifact/ninja-win${{ matrix.suffix }}.zip ./build/Release/ninja.exe
# Upload ninja binary archive as an artifact
- name: Upload artifact
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
with:
name: ninja-binary-archives
path: artifact

- name: Upload release asset
if: github.event.action == 'published'
uses: actions/upload-release-asset@v1.0.1
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./artifact/ninja-win.zip
asset_name: ninja-win.zip
asset_path: ./artifact/ninja-win${{ matrix.suffix }}.zip
asset_name: ninja-win${{ matrix.suffix }}.zip
asset_content_type: application/zip
Loading

0 comments on commit 65d0dfc

Please sign in to comment.