Skip to content

Commit

Permalink
try setting up CI
Browse files Browse the repository at this point in the history
  • Loading branch information
vrsandeep committed Dec 13, 2024
1 parent 8ba3aac commit d966994
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
name: Build

on:
repository_dispatch:
workflow_dispatch:

jobs:
build:
if: "!contains(github.event.head_commit.message, 'skip ci')"
pull_request:
types: ['opened', 'reopened', 'synchronize', 'ready_for_review']

jobs:
build-and-test:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
container:
image: crystallang/crystal:1.0.0-alpine

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install dependencies
run: apk add --no-cache yarn yaml-static sqlite-static libarchive-dev libarchive-static acl-static expat-static zstd-static lz4-static bzip2-static libjpeg-turbo-dev libpng-dev tiff-dev
- name: Build
Expand All @@ -22,10 +21,25 @@ jobs:
run: make check
- name: Run tests
run: make test

upload-artifacts:
needs: build-and-test
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
container:
image: crystallang/crystal:1.0.0-alpine
steps:
- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: mango
path: mango
# - name: build arm32v7 object file
# run: make arm32v7 || make arm32v7
- name: build arm64v8 object file
run: make arm64v8 || make arm64v8
- name: Upload object files
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: object files
path: ./*.o

0 comments on commit d966994

Please sign in to comment.