-
Notifications
You must be signed in to change notification settings - Fork 8
108 lines (98 loc) · 3.38 KB
/
test.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# This workflow will automatically upload a binary artifact when a release/tag is created
name: Testing
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
# allow to build manually
workflow_dispatch:
# build automatically when pushing a tag
push:
branches:
- "master"
pull_request:
jobs:
# ----------------------------------------------------------------------------
# this will checkout and build nim stable from gh repository on manylinux2014 / CentOS 7
build-linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: jiro4989/setup-nim-action@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build binary
run: |
nimble install -y
nimble build -d:release
ls bin/*
- name: Testing binaries
run: |
${{ runner.workspace }}/choosenim/bin/choosenim stable
/home/runner/.nimble/bin/nim -v
${{ runner.workspace }}/choosenim/bin/choosenim devel
/home/runner/.nimble/bin/nim -v
nimble test
# ----------------------------------------------------------------------------
# this uses choosenim by itself - you may need to build manually if you break choosenim
build-win32:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: jiro4989/setup-nim-action@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build binary
run: |
nimble install -y
nimble build
dir bin/*
mkdir zipfile
mkdir zipfile/choosenim
cp bin/choosenim.exe zipfile/choosenim/
cp scripts/runme.bat zipfile/
Compress-Archive -Path zipfile/* -Destination choosenim-windows.zip
- name: Testing binaries
run: nimble test
# ----------------------------------------------------------------------------
# this uses choosenim by itself - you may need to build manually if you break choosenim
build-macos:
runs-on: macos-12
steps:
- uses: actions/checkout@v4
- uses: jiro4989/setup-nim-action@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build binary
run: |
git config --global --add safe.directory /__w/choosenim/choosenim
nimble install -y
nimble build -d:staticBuild
ls bin/*
- name: Testing binaries
run: |
${{ runner.workspace }}/choosenim/bin/choosenim stable
/Users/runner/.nimble/bin/nim -v
${{ runner.workspace }}/choosenim/bin/choosenim devel
/Users/runner/.nimble/bin/nim -v
nimble test
build-macos_arm64:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: jiro4989/setup-nim-action@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build binary
run: |
git config --global --add safe.directory /__w/choosenim/choosenim
nimble install -y
nimble build -d:staticBuild
ls bin/*
- name: Testing binaries
run: |
${{ runner.workspace }}/choosenim/bin/choosenim stable
/Users/runner/.nimble/bin/nim -v
nimble test
${{ runner.workspace }}/choosenim/bin/choosenim devel
/Users/runner/.nimble/bin/nim -v