Skip to content

Commit

Permalink
Merge pull request #1 from piyoppi/add-workflows
Browse files Browse the repository at this point in the history
Add continuous testing workflow
  • Loading branch information
piyoppi committed Mar 3, 2024
2 parents 24eb615 + 86b109d commit fa26c3a
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/release-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Release-Nightly

on:
push:
branches:
- main

jobs:
build:
name: Build and Release
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Build
run: cargo build --release

- run: mkdir -p target/release/${{ matrix.os }}

- run: cp target/release/chiritori target/release/${{ matrix.os }}/chiritori

- name: Upload Release Asset
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os}}-binary
path: target/release/${{ matrix.os }}

release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Download Artifacts (ubuntu-latest-binary)
uses: actions/download-artifact@v4
with:
name: ubuntu-latest-binary

- name: Download Artifacts (macos-latest-binary)
uses: actions/download-artifact@v4
with:
name: macos-latest-binary

- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: nightly
draft: true
prerelease: true
files: |
target/release/ubuntu-latest/*
target/release/macos-latest/*
21 changes: 21 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: test

on:
push:
branches:
- main
pull_request:
branches:
- main

env:
CARGO_TERM_COLOR: always

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Run tests
run: cargo test --verbose

0 comments on commit fa26c3a

Please sign in to comment.