Skip to content

Commit

Permalink
Adding a check for PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
karthiknadig committed Jun 4, 2024
1 parent b075d49 commit a181d4e
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Build

on:
push:
branches:
- main
- release*
- release/*
- release-*

jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
target: x86_64-pc-windows-msvc
- os: windows-latest
target: aarch64-pc-windows-msvc
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
# - os: ubuntu-latest
# target: aarch64-unknown-linux-gnu
# - os: ubuntu-latest
# target: arm-unknown-linux-gnueabihf
- os: macos-latest
target: x86_64-apple-darwin
- os: macos-14
target: aarch64-apple-darwin
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
vsix-target: alpine-x64
# - os: ubuntu-latest
# target: aarch64-unknown-linux-musl
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Rust Tool Chain setup
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: ${{ matrix.target }}

- name: Cargo Fetch
run: cargo fetch

- name: Build
run: cargo build --release --target ${{ matrix.target }}

- name: Archive
run: |
mkdir -p artifacts
cp target/${{ matrix.target }}/release/pet.* artifacts/pet-${{ matrix.target }}.tar.gz
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: pet-${{ matrix.target }}
path: artifacts/pet-${{ matrix.target }}.tar.gz

2 changes: 2 additions & 0 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
branches-ignore:
- main
- release*
- release/*
- release-*

jobs:
tests:
Expand Down

0 comments on commit a181d4e

Please sign in to comment.