fixing ci
This commit is contained in:
parent
a47d6b4320
commit
501e1d6fb4
25
.github/workflows/test.yml
vendored
25
.github/workflows/test.yml
vendored
@ -8,10 +8,9 @@ env:
|
|||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build-web:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
name: Build WASM
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
@ -19,9 +18,11 @@ jobs:
|
|||||||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||||
|
|
||||||
- name: Test WASM in-browser
|
- name: Test WASM in-browser
|
||||||
|
working-directory: ./draught_web
|
||||||
run: wasm-pack test --firefox --chrome --headless
|
run: wasm-pack test --firefox --chrome --headless
|
||||||
|
|
||||||
- name: Build Rust for WASM
|
- name: Build Rust for WASM
|
||||||
|
working-directory: ./draught_web
|
||||||
run: wasm-pack build --release
|
run: wasm-pack build --release
|
||||||
|
|
||||||
- name: Install Node
|
- name: Install Node
|
||||||
@ -31,11 +32,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Install Node Modules
|
- name: Install Node Modules
|
||||||
run: npm ci
|
run: npm ci
|
||||||
working-directory: ./www
|
working-directory: ./draught_web/www
|
||||||
|
|
||||||
- name: Build Js
|
- name: Build Js
|
||||||
run: npm run build --if-present
|
run: npm run build --if-present
|
||||||
working-directory: ./www
|
working-directory: ./draught_web/www
|
||||||
|
|
||||||
- name: Build Docs
|
- name: Build Docs
|
||||||
run: cargo doc --no-deps --document-private-items
|
run: cargo doc --no-deps --document-private-items
|
||||||
@ -52,12 +53,20 @@ jobs:
|
|||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./www/dist
|
publish_dir: ./www/dist
|
||||||
|
|
||||||
package:
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Build Native
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Build Binary
|
||||||
|
run: cargo build
|
||||||
|
working-directory: ./draught
|
||||||
|
|
||||||
|
package:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build] # for ignoring bad builds
|
needs: [build] # for ignoring bad builds
|
||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
@ -73,5 +82,7 @@ jobs:
|
|||||||
- name: Build & Push Container
|
- name: Build & Push Container
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
|
file: ./draught_web/Dockerfile
|
||||||
|
context: ./draught_web
|
||||||
push: true
|
push: true
|
||||||
tags: sarsoo/draught:latest
|
tags: sarsoo/draught:latest
|
@ -6,9 +6,12 @@ pipeline {
|
|||||||
when { branch 'master' }
|
when { branch 'master' }
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
docker.withRegistry('https://registry.sarsoo.xyz', 'git-registry-creds') {
|
dir('draught_web')
|
||||||
|
{
|
||||||
docker.build("sarsoo/draught:latest").push()
|
docker.withRegistry('https://registry.sarsoo.xyz', 'git-registry-creds')
|
||||||
|
{
|
||||||
|
docker.build("sarsoo/draught:latest").push()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user