-
Notifications
You must be signed in to change notification settings - Fork 2.3k
48 lines (44 loc) · 1.15 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Build Docker Images
on:
workflow_dispatch:
inputs:
onmt_version:
description: "OpenNMT version"
required: true
type: string
# to facilitate initial tests in PR
push:
branches:
- "docker"
run-name: ${{ github.workflow }} -- ${{ inputs.onmt_version || 'test' }}
env:
ONMT_VERSION: ${{ inputs.onmt_version || 'test' }}
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
cuda_version: [11.8.0, 12.1.0]
fail-fast: false
permissions: write-all
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 512
swap-size-mb: 10
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
overprovision-lvm: 'true'
- name: Checkout opennmt repo
uses: actions/checkout@v4
- name: Login to ghcr
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: |
docker/build.sh ${{ env.ONMT_VERSION }} ${{ matrix.cuda_version}}