Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "Rust",
"image": "mcr.microsoft.com/devcontainers/rust:1-1-bullseye"
}
29 changes: 0 additions & 29 deletions .github/workflows/build.yaml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

env:
CARGO_TERM_COLOR: always

jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable]

steps:
- uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: rustfmt, clippy
profile: minimal
cache: 'cargo'

- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: "."

- name: Check formatting
run: cargo fmt --all -- --check

- name: Clippy
run: cargo clippy -- -D warnings

- name: Build
run: cargo build --verbose

- name: Run tests
run: cargo test --verbose

24 changes: 0 additions & 24 deletions .github/workflows/release.yaml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/release_linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build and upload release (linux)

on:
push:
tags:
- 'v*'

env:
APP_NAME: buranko
ARCHIVE_NAME: buranko_linux-x64.tar.gz

jobs:
build:
runs-on: ubuntu-latest

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

- name: Build application
run: |
docker run --rm -t -v $HOME/.cargo/registry/:/root/.cargo/registry -v "$(pwd)":/volume clux/muslrust:stable cargo build --release

- name: Create archive
run: |
tar -czf $ARCHIVE_NAME -C target/x86_64-unknown-linux-musl/release $APP_NAME

- name: Upload release asset
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ env.ARCHIVE_NAME }}
asset_name: ${{ env.ARCHIVE_NAME }}
tag: ${{ github.ref }}
overwrite: true

32 changes: 32 additions & 0 deletions .github/workflows/release_macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build and upload release (macos)

on:
push:
tags:
- 'v*'

env:
APP_NAME: buranko
ARCHIVE_NAME: buranko_macos-x64.tar.gz

jobs:
build:
runs-on: macos-latest

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

- name: Build application
run: |
cargo build --release
tar -czf $ARCHIVE_NAME -C target/release $APP_NAME

- name: Upload release asset
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ env.ARCHIVE_NAME }}
asset_name: ${{ env.ARCHIVE_NAME }}
tag: ${{ github.ref }}
overwrite: true
36 changes: 36 additions & 0 deletions .github/workflows/release_windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build and upload release (windows)

on:
push:
tags:
- 'v*'

env:
APP_NAME: buranko
ARCHIVE_NAME: buranko_windows-x64.zip

jobs:
build:
runs-on: windows-latest

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

- name: Build application
run: |
cargo build --release
cd target/release
ls
7z a -tzip $ARCHIVE_NAME $APP_NAME.exe
mv $ARCHIVE_NAME ../../
shell: bash

- name: Upload release asset
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ env.ARCHIVE_NAME }}
asset_name: ${{ env.ARCHIVE_NAME }}
tag: ${{ github.ref }}
overwrite: true
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
*.test
/buranko
/target
Loading
Loading