mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
187 lines
7.5 KiB
YAML
187 lines
7.5 KiB
YAML
name: ci
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- master
|
|
- ci-scripts
|
|
env:
|
|
ci-zig-version: 0.13.0-dev.76+dee9f82f6
|
|
jobs:
|
|
x86_64-linux-debug:
|
|
if: github.repository_owner == 'ziglang'
|
|
runs-on: [self-hosted, Linux, x86_64]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Build and Test
|
|
working-directory: ci
|
|
run: ~/deps/zig-x86_64-linux-musl-${{env.ci-zig-version}}/bin/zig build --maxrss 21000000000 -Dbuild-type=Debug -Dextra-target=arm-linux-musleabihf test-cmake-bootstrap update-stage1
|
|
x86_64-linux-release:
|
|
if: github.repository_owner == 'ziglang'
|
|
runs-on: [self-hosted, Linux, x86_64]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Build and Test
|
|
working-directory: ci
|
|
run: ~/deps/zig-x86_64-linux-musl-${{env.ci-zig-version}}/bin/zig build --maxrss 21000000000 -Dbuild-type=Release -Dextra-target=arm-linux-musleabihf -Dcc=cc test-cc-bootstrap test-cmake-bootstrap reproducible update-stage1
|
|
aarch64-linux-debug:
|
|
if: github.repository_owner == 'ziglang'
|
|
runs-on: [self-hosted, Linux, aarch64]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Build and Test
|
|
working-directory: ci
|
|
run: ~/deps/zig-aarch64-linux-musl-${{env.ci-zig-version}}/bin/zig build --maxrss 24696061952 -Dbuild-type=Debug -Dextra-target=arm-linux-musleabihf test-cmake-bootstrap update-stage1
|
|
aarch64-linux-release:
|
|
if: github.repository_owner == 'ziglang'
|
|
runs-on: [self-hosted, Linux, aarch64]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Build and Test
|
|
working-directory: ci
|
|
run: ~/deps/zig-aarch64-linux-musl-${{env.ci-zig-version}}/bin/zig build --maxrss 24696061952 -Dbuild-type=Release -Dextra-target=arm-linux-musleabihf test-cmake-bootstrap reproducible update-stage1
|
|
x86_64-macos-debug:
|
|
if: github.repository_owner == 'ziglang'
|
|
runs-on: macos-12
|
|
steps:
|
|
- name: Restore Zig Cache
|
|
id: zig-cache
|
|
uses: actions/cache/restore@v4
|
|
with:
|
|
path: ~/deps/zig-x86_64-macos-none-${{env.ci-zig-version}}
|
|
key: zig-x86_64-macos-none-${{env.ci-zig-version}}
|
|
- name: Download Zig
|
|
if: steps.zig-cache.outputs.cache-hit != 'true'
|
|
run: 'mkdir -p ~/deps && curl https://jacobly.com/deps/zig-x86_64-macos-none-${{env.ci-zig-version}}.tar.xz | tar xJ -C ~/deps'
|
|
- name: Save Zig Cache
|
|
if: steps.zig-cache.outputs.cache-hit != 'true'
|
|
uses: actions/cache/save@v4
|
|
with:
|
|
path: ~/deps/zig-x86_64-macos-none-${{env.ci-zig-version}}
|
|
key: ${{steps.zig-cache.outputs.cache-primary-key}}
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Restore Package Cache
|
|
id: package-cache
|
|
uses: actions/cache/restore@v4
|
|
with:
|
|
path: ~/.cache/zig
|
|
key: x86_64-macos-package-${{hashFiles('ci/build.zig.zon')}}
|
|
restore-keys: x86_64-macos-package-
|
|
- name: Build and Test
|
|
working-directory: ci
|
|
run: ~/deps/zig-x86_64-macos-none-${{env.ci-zig-version}}/bin/zig build -Dbuild-type=Debug -Dskip-non-native test-cmake-bootstrap update-stage1
|
|
- name: Save Package Cache
|
|
if: steps.package-cache.outputs.cache-hit != 'true'
|
|
uses: actions/cache/save@v4
|
|
with:
|
|
path: ~/.cache/zig
|
|
key: ${{steps.package-cache.outputs.cache-primary-key}}
|
|
x86_64-macos-release:
|
|
if: github.repository_owner == 'ziglang'
|
|
runs-on: macos-12
|
|
steps:
|
|
- name: Restore Zig Cache
|
|
id: zig-cache
|
|
uses: actions/cache/restore@v4
|
|
with:
|
|
path: ~/deps/zig-x86_64-macos-none-${{env.ci-zig-version}}
|
|
key: zig-x86_64-macos-none-${{env.ci-zig-version}}
|
|
- name: Download Zig
|
|
if: steps.zig-cache.outputs.cache-hit != 'true'
|
|
run: 'mkdir -p ~/deps && curl https://jacobly.com/deps/zig-x86_64-macos-none-${{env.ci-zig-version}}.tar.xz | tar xJ -C ~/deps'
|
|
- name: Save Zig Cache
|
|
if: steps.zig-cache.outputs.cache-hit != 'true'
|
|
uses: actions/cache/save@v4
|
|
with:
|
|
path: ~/deps/zig-x86_64-macos-none-${{env.ci-zig-version}}
|
|
key: ${{steps.zig-cache.outputs.cache-primary-key}}
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Restore Package Cache
|
|
id: package-cache
|
|
uses: actions/cache/restore@v4
|
|
with:
|
|
path: ~/.cache/zig
|
|
key: x86_64-macos-package-${{hashFiles('ci/build.zig.zon')}}
|
|
restore-keys: x86_64-macos-package-
|
|
- name: Build and Test
|
|
working-directory: ci
|
|
run: ~/deps/zig-x86_64-macos-none-${{env.ci-zig-version}}/bin/zig build -Dbuild-type=Release -Dcc=cc -Dskip-non-native test-cc-bootstrap test-cmake-bootstrap reproducible update-stage1
|
|
- name: Save Package Cache
|
|
if: steps.package-cache.outputs.cache-hit != 'true'
|
|
uses: actions/cache/save@v4
|
|
with:
|
|
path: ~/.cache/zig
|
|
key: ${{steps.package-cache.outputs.cache-primary-key}}
|
|
aarch64-macos-debug:
|
|
if: github.repository_owner == 'ziglang'
|
|
runs-on: [self-hosted, macOS, aarch64]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Build and Test
|
|
working-directory: ci
|
|
run: ~/deps/zig-aarch64-macos-none-${{env.ci-zig-version}}/bin/zig build -Dbuild-type=Debug -Dskip-non-native test-cmake-bootstrap update-stage1
|
|
aarch64-macos-release:
|
|
if: github.repository_owner == 'ziglang'
|
|
runs-on: [self-hosted, macOS, aarch64]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Build and Test
|
|
working-directory: ci
|
|
run: ~/deps/zig-aarch64-macos-none-${{env.ci-zig-version}}/bin/zig build -Dbuild-type=Release -Dskip-non-native test-cmake-bootstrap reproducible update-stage1
|
|
x86_64-windows-debug:
|
|
if: github.repository_owner == 'ziglang'
|
|
runs-on: [self-hosted, Windows, x86_64]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Build and Test
|
|
working-directory: ci
|
|
run: '& $Env:USERPROFILE\deps\zig-x86_64-windows-gnu-${{env.ci-zig-version}}\bin\zig.exe build -Dbuild-type=Debug -Dskip-non-native test-cmake-bootstrap update-stage1 msvc'
|
|
x86_64-windows-release:
|
|
if: github.repository_owner == 'ziglang'
|
|
runs-on: [self-hosted, Windows, x86_64]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Build and Test
|
|
working-directory: ci
|
|
run: '& $Env:USERPROFILE\deps\zig-x86_64-windows-gnu-${{env.ci-zig-version}}\bin\zig.exe build -Dbuild-type=Release -Dskip-non-native test-cmake-bootstrap update-stage1 msvc' # reproducible
|
|
aarch64-windows-release:
|
|
if: github.repository_owner == 'ziglang'
|
|
runs-on: [self-hosted, Windows, aarch64]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Build and Test
|
|
working-directory: ci
|
|
run: '& $Env:USERPROFILE\deps\zig-aarch64-windows-gnu-${{env.ci-zig-version}}\bin\zig.exe build -Dbuild-type=Release -Dskip-non-native test-cmake-bootstrap' # reproducible
|