Skip to content

Commit

Permalink
CI: Add workflow file to build and release compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
joncinque committed Jan 31, 2024
1 parent ec66923 commit 2c7d24e
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Build compiler for linux and mac

on: [pull_request, push, workflow_dispatch]

jobs:
build:
name: Build zig
runs-on: ${{ matrix.os }}
timeout-minutes: 600
strategy:
matrix:
include:
- target: x86_64-linux-gnu
os: ubuntu-latest
- target: aarch64-linux-gnu
os: ubuntu-latest
- target: x86_64-macos-none
os: macos-latest
- target: aarch64-macos-none
os: macos-latest
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install coreutils
run: |
brew update && brew install coreutils
if: matrix.os == 'macos-latest'
shell: bash
- name: Build
run: ./build ${{ matrix.target }} baseline
shell: bash
- name: Create tarball
run: tar -C out -cjf zig-${{ matrix.target }}.tar.bz2 zig-${{ matrix.target }}-baseline
shell: bash
- name: Upload ${{ matrix.target }} tarball
uses: actions/upload-artifact@v4
with:
name: zig-${{ matrix.target }}.tar.bz2
path: zig-${{ matrix.target }}.tar.bz2

create_release:
name: Create Release
needs: build
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') }}
steps:
- name: Download tarballs into zig-bootstrap-solana/
uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: Create GH Release
uses: softprops/[email protected]
with:
fail_on_unmatched_files: true
files: zig-*.tar.bz2

0 comments on commit 2c7d24e

Please sign in to comment.