From e2caa94b067f0d269f29391a74d1d96c5de016ea Mon Sep 17 00:00:00 2001 From: piyoppi Date: Sun, 3 Mar 2024 17:46:49 +0900 Subject: [PATCH 1/2] add continuous testing workflow --- .github/workflows/test.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..34c09ee --- /dev/null +++ b/.github/workflows/test.yml @@ -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 From 86b109d2a7f9846bba0aa1e17e7620eb6c57fe7e Mon Sep 17 00:00:00 2001 From: piyoppi Date: Sun, 3 Mar 2024 18:46:58 +0900 Subject: [PATCH 2/2] Add release (nightly) workflow --- .github/workflows/release-nightly.yml | 64 +++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/release-nightly.yml diff --git a/.github/workflows/release-nightly.yml b/.github/workflows/release-nightly.yml new file mode 100644 index 0000000..54abcb2 --- /dev/null +++ b/.github/workflows/release-nightly.yml @@ -0,0 +1,64 @@ +name: Release-Nightly + +on: + push: + branches: + - main + +jobs: + build: + name: Build and Release + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Build + run: cargo build --release + + - run: mkdir -p target/release/${{ runner.os }} + + - run: cp target/release/chiritori target/release/${{ runner.os }}/chiritori + + - name: Upload Release Asset + uses: actions/upload-artifact@v4 + with: + name: ${{ runner.os }}-binary + path: target/release/${{ runner.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 (windows-latest-binary) + uses: actions/download-artifact@v4 + with: + name: windows-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/windows-latest/* + target/release/macos-latest/*