Skip to content

Commit

Permalink
CI: Run linux on self-hosted, Make windows download smaller and remov…
Browse files Browse the repository at this point in the history
…e caching (#150)
  • Loading branch information
jeremyfelder committed Aug 16, 2023
1 parent 2a3f5a2 commit db93204
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 27 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build Dev

on:
pull_request:
branches:
- dev
paths:
- icicle/**
- src/**
- Cargo.toml
- build.rs

env:
CARGO_TERM_COLOR: always
ARCH_TYPE: sm_70

jobs:
build-linux:
runs-on: [self-hosted, Linux, X64, icicle]
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Build
run: cargo build --release --verbose


build-windows:
runs-on: windows-2022
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Download and Install Cuda
uses: Jimver/cuda-toolkit@v0.2.11
with:
cuda: '12.0.0'
method: 'network'
# https://docs.nvidia.com/cuda/archive/12.0.0/cuda-installation-guide-microsoft-windows/index.html
sub-packages: '["cudart", "nvcc", "thrust"]'
- name: Build
run: cargo build --release --verbose
45 changes: 18 additions & 27 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,40 @@
name: Build

on:
on:
pull_request:
branches:
- "main"
- "dev"
- main
paths:
- "icicle/**"
- "src/**"
- "Cargo.toml"
- "build.rs"
- icicle/**
- src/**
- Cargo.toml
- build.rs

env:
CARGO_TERM_COLOR: always
ARCH_TYPE: sm_70
DEFAULT_STREAM: per-thread

jobs:
build-linux:
runs-on: ubuntu-latest

runs-on: [self-hosted, Linux, X64, icicle]
steps:
# Checkout code
- uses: actions/checkout@v3
# Download (or from cache) and install CUDA Toolkit 12.1.0
- uses: Jimver/cuda-toolkit@v0.2.9
id: cuda-toolkit
with:
cuda: '12.1.0'
use-github-cache: true
# Build from cargo - Rust utils are preinstalled on latest images
# https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md#rust-tools
- name: Checkout Repo
uses: actions/checkout@v3
- name: Build
run: cargo build --release --verbose


build-windows:
runs-on: windows-latest

runs-on: windows-2022
steps:
- uses: actions/checkout@v3
- uses: Jimver/cuda-toolkit@v0.2.9
id: cuda-toolkit
- name: Checkout Repo
uses: actions/checkout@v3
- name: Download and Install Cuda
uses: Jimver/cuda-toolkit@v0.2.11
with:
cuda: '12.1.0'
use-github-cache: true
cuda: '12.0.0'
method: 'network'
# https://docs.nvidia.com/cuda/archive/12.0.0/cuda-installation-guide-microsoft-windows/index.html
sub-packages: '["cudart", "nvcc", "thrust"]'
- name: Build
run: cargo build --release --verbose

0 comments on commit db93204

Please sign in to comment.