-
Notifications
You must be signed in to change notification settings - Fork 3
105 lines (102 loc) · 3.17 KB
/
ci.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
name: CI
on:
push:
branches:
- main
tags:
- "v*"
pull_request:
jobs:
build-macos-launcher:
name: build-macos-launcher ${{ matrix.OS }}
strategy:
fail-fast: false
matrix:
OS: ["macOS-m1", "macos-latest"]
include:
- OS: "macOS-m1"
JVM: "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.1.0/graalvm-ce-java17-darwin-aarch64-22.1.0.tar.gz"
- OS: "macos-latest"
JVM: "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.1.0/graalvm-ce-java17-darwin-amd64-22.1.0.tar.gz"
runs-on: ${{ matrix.OS }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: coursier/[email protected]
with:
apps: ""
jvm: ${{ matrix.JVM }}
- run: |
./mill -i "cs-m1.writeNativeImageScript" generate.sh "" && \
./generate.sh && \
./mill -i "cs-m1.copyToArtifacts" artifacts/
env:
GRAALVM_ID: ${{ matrix.JVM }}
- name: Build OS packages
if: matrix.os == 'macOS-m1'
run: .github/scripts/generate-os-packages.sh
shell: bash
- uses: actions/[email protected]
with:
name: macos-launcher
path: artifacts/
if-no-files-found: error
retention-days: 1
- name: Test
run: ./mill -i cs-m1-tests.test
build-linux-launcher:
runs-on: "macOS-m1"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: coursier/[email protected]
with:
apps: ""
- name: Build Linux aarch64 launcher
run: |
set -euv
export DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)"
mkdir -p artifacts
mkdir -p utils
cp "$(cs get https://github.com/coursier/coursier/releases/download/v2.0.16/cs-aarch64-pc-linux)" utils/cs
chmod +x utils/cs
cp "$DIR/build-linux-aarch64-from-docker.sh" utils/
docker run $(if test -t 1; then echo "-it"; fi) --rm \
--volume "$(pwd):/data" \
-w /data \
-e "CI=$CI" \
ubuntu:20.04 \
/data/utils/build-linux-aarch64-from-docker.sh
- uses: actions/[email protected]
with:
name: linux-launcher
path: artifacts/
if-no-files-found: error
retention-days: 1
- run: .github/scripts/test-linux-aarch64.sh
upload-artifacts:
if: github.event_name == 'push'
runs-on: "ubuntu-latest"
needs: ["build-macos-launcher", "build-linux-launcher"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- name: Get macOS launchers
uses: actions/download-artifact@v3
with:
name: macos-launcher
path: artifacts/
- name: Get Linux launcher
uses: actions/download-artifact@v3
with:
name: linux-launcher
path: artifacts/
- run: ./mill -i ci.upload artifacts/
env:
UPLOAD_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}