diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..520aa8cd --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,83 @@ +name: CI + +on: + push: + branches: ['master'] + pull_request: + +jobs: + test: + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + toolchain-type: [stable] + + runs-on: ${{matrix.os}} + + steps: + - name: Install shaderc + if: matrix.os == 'ubuntu-latest' + run: | + wget -nv -r -nd -A install.tgz 'https://storage.googleapis.com/shaderc/badges/build_link_linux_clang_release.html' + tar xf install.tgz + export SHADERC_LIB_DIR="$PWD/install/lib" + - name: Install Ninja + if: matrix.os == 'windows-latest' + run: choco install ninja + + - uses: actions/checkout@v1 + + - name: Test ls + run: | + pwd + ls + + - uses: actions/upload-artifact@v2 + with: + name: hypermine-pre + path: D:/a/hypermine/hypermine/assets/materials/00001_dirt.png + + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{matrix.toolchain-type}} + override: true + - uses: actions-rs/cargo@v1 + with: + command: build + args: --workspace --all-targets + - uses: actions-rs/cargo@v1 + with: + command: test + args: --workspace + + + - uses: actions-rs/cargo@v1 + with: + command: build + args: --bin client --release + + - uses: actions/upload-artifact@v2 + with: + name: hypermine + path: D:/a/hypermine/hypermine/target/release/client.exe + + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + components: rustfmt, clippy + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + - uses: actions-rs/cargo@v1 + if: always() + with: + command: clippy + args: --workspace --all-targets -- -D warnings diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 190aa81c..e71a93f4 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -38,6 +38,10 @@ jobs: with: command: test args: --workspace + - uses: actions/upload-artifact@v2 + with: + name: hypermine + path: path/target/release/client* lint: runs-on: ubuntu-latest