ci: use our arc runner set for Rust builds (#482)
This commit is contained in:
4
.github/workflows/docker.yaml
vendored
4
.github/workflows/docker.yaml
vendored
@@ -20,7 +20,7 @@ concurrency:
|
|||||||
jobs:
|
jobs:
|
||||||
base:
|
base:
|
||||||
name: Test base image build
|
name: Test base image build
|
||||||
runs-on: ubuntu-latest
|
runs-on: arc-runner-set
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
steps:
|
steps:
|
||||||
# Configure build environment
|
# Configure build environment
|
||||||
@@ -41,7 +41,7 @@ jobs:
|
|||||||
cache-to: type=gha,scope=buildx-base-multi-arch,mode=max
|
cache-to: type=gha,scope=buildx-base-multi-arch,mode=max
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
runs-on: self-hosted
|
runs-on: arc-runner-set
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
name: Publish Docker images
|
name: Publish Docker images
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
35
.github/workflows/rust.yaml
vendored
35
.github/workflows/rust.yaml
vendored
@@ -15,29 +15,28 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
name: Rust project
|
name: Rust project
|
||||||
runs-on: ubuntu-latest
|
runs-on: arc-runner-set
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
- name: Free up disk space
|
|
||||||
run: |
|
# Using our own runners for now:
|
||||||
sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc
|
# - name: Free up disk space
|
||||||
|
# run: |
|
||||||
|
# sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc
|
||||||
|
|
||||||
- name: Install latest stable
|
- name: Install latest stable
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
override: true
|
|
||||||
components: rustfmt, clippy
|
components: rustfmt, clippy
|
||||||
|
|
||||||
- name: Install cargo-nextest
|
- name: Install cargo-nextest
|
||||||
uses: baptiste0928/cargo-install@v1
|
uses: taiki-e/install-action@a58ae9526b2c3acee9ad8e1926b950b7863305d4 # 2.65.16
|
||||||
with:
|
with:
|
||||||
crate: cargo-nextest
|
tool: cargo-nextest@0.9.119
|
||||||
args: --locked
|
|
||||||
|
|
||||||
- name: Run cargo build
|
- name: Run cargo build
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo build
|
||||||
with:
|
|
||||||
command: build
|
|
||||||
|
|
||||||
- name: Run services in background
|
- name: Run services in background
|
||||||
run: |
|
run: |
|
||||||
@@ -65,13 +64,13 @@ jobs:
|
|||||||
|
|
||||||
- name: Wait for API to go up
|
- name: Wait for API to go up
|
||||||
if: github.event_name != 'pull_request' && github.ref_name == 'main'
|
if: github.event_name != 'pull_request' && github.ref_name == 'main'
|
||||||
uses: nev7n/wait_for_response@v1
|
uses: nev7n/wait_for_response@7fef3c1a6e8939d0b09062f14fec50d3c5d15fa1 # v1.0.1
|
||||||
with:
|
with:
|
||||||
url: "http://localhost:14702/"
|
url: "http://localhost:14702/"
|
||||||
|
|
||||||
- name: Checkout API repository
|
- name: Checkout API repository
|
||||||
if: github.event_name != 'pull_request' && github.ref_name == 'main'
|
if: github.event_name != 'pull_request' && github.ref_name == 'main'
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
with:
|
with:
|
||||||
repository: stoatchat/javascript-client-api
|
repository: stoatchat/javascript-client-api
|
||||||
path: api
|
path: api
|
||||||
@@ -83,10 +82,10 @@ jobs:
|
|||||||
|
|
||||||
- name: Commit changes
|
- name: Commit changes
|
||||||
if: github.event_name != 'pull_request' && github.ref_name == 'main'
|
if: github.event_name != 'pull_request' && github.ref_name == 'main'
|
||||||
uses: EndBug/add-and-commit@v4
|
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4
|
||||||
with:
|
with:
|
||||||
cwd: "api"
|
cwd: "api"
|
||||||
add: "*.json"
|
add: "*.json"
|
||||||
author_name: Revolt CI
|
author_name: Stoat CI
|
||||||
author_email: revolt-ci@users.noreply.github.com
|
author_email: stoat-ci@users.noreply.github.com
|
||||||
message: "chore: generate OpenAPI specification"
|
message: "chore: generate OpenAPI specification"
|
||||||
|
|||||||
Reference in New Issue
Block a user