Skip to content

Commit

Permalink
Merge pull request #67 from xEgoist/master
Browse files Browse the repository at this point in the history
Add CI build for aarch64 for all platforms
  • Loading branch information
marler8997 authored Aug 25, 2022
2 parents 9f8c5f9 + a2eaf93 commit bc2ed0e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
21 changes: 18 additions & 3 deletions .github/workflows/artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ jobs:
test:
strategy:
matrix:
arch: [x86_64]
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
runs-on: ${{matrix.os}}
Expand All @@ -13,9 +14,23 @@ jobs:
with:
version: 0.10.0-dev.3027+0e26c6149
- run: |
zig build test -Dfetch -Dci_target=${{matrix.os}}
shell: bash
zig build test -Dfetch -Dci_target=${{matrix.os}}-${{matrix.arch}}
- run: |
zig build -Dfetch -Dci_target=ubuntu-latest-x86_64 -p zig-out-ubuntu-latest-x86_64
- run: |
zig build -Dfetch -Dci_target=ubuntu-latest-aarch64 -p zig-out-ubuntu-latest-aarch64
- run: |
zig build -Dfetch -Dci_target=macos-latest-x86_64 -p zig-out-macos-latest-x86_64
- run: |
zig build -Dfetch -Dci_target=macos-latest-aarch64 -p zig-out-macos-latest-aarch64
- run: |
zig build -Dfetch -Dci_target=windows-latest-x86_64 -p zig-out-windows-latest-x86_64
- uses: actions/upload-artifact@v2
with:
name: zigup ${{ matrix.os }}
name: zigup ${{ matrix.os }}-${{ matrix.arch }}
path: zig-out/bin/*
- if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }}
uses: actions/upload-artifact@v2
with:
name: zigup ${{ matrix.os }}-aarch64
path: zig-out-${{matrix.os}}-aarch64/bin/*
8 changes: 5 additions & 3 deletions build2.zig
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,9 @@ fn join(b: *Builder, parts: []const []const u8) ![]const u8 {
}

const ci_target_map = std.ComptimeStringMap([]const u8, .{
.{ "ubuntu-latest", "x86_64-linux" },
.{ "macos-latest", "x86_64-macos" },
.{ "windows-latest", "x86_64-windows" },
.{ "ubuntu-latest-x86_64", "x86_64-linux" },
.{ "macos-latest-x86_64", "x86_64-macos" },
.{ "windows-latest-x86_64", "x86_64-windows" },
.{ "ubuntu-latest-aarch64", "aarch64-linux" },
.{ "macos-latest-aarch64", "aarch64-macos" },
});

0 comments on commit bc2ed0e

Please sign in to comment.