Skip to content

Commit 5d92aca

Browse files
authored
automation: new Build Release GitHub workflow (#1552)
macOS-only for now. Once the workflow succeeds we have to retrieve the built artifact (URL in the workflow output) and manually upload it to the release.
2 parents 96c108c + 0847cca commit 5d92aca

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/build-release.yaml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Build Release
2+
3+
on:
4+
# Manual trigger only
5+
workflow_dispatch:
6+
7+
jobs:
8+
build:
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
matrix:
12+
# TODO: ubuntu-latest
13+
os: [macos-latest]
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
submodules: recursive
18+
19+
- name: Install Dependencies
20+
run: |
21+
# if [ "$RUNNER_OS" == "Linux" ]; then
22+
# sudo apt-get install libgc-dev
23+
# fi
24+
if [ "$RUNNER_OS" == "macOS" ]; then
25+
brew install autoconf automake ninja
26+
fi
27+
28+
- name: Install bootstrap compiler
29+
run: |
30+
if [ "$RUNNER_OS" == "Linux" ]; then
31+
curl -LO https://github.com/dylan-lang/opendylan/releases/download/v2023.1.0/opendylan-2023.1-x86_64-linux.tar.bz2
32+
tar xvf opendylan-2023.1-x86_64-linux.tar.bz2
33+
fi
34+
if [ "$RUNNER_OS" == "macOS" ]; then
35+
curl -LO https://github.com/dylan-lang/opendylan/releases/download/v2023.1.0/opendylan-2023.1-x86_64-darwin.tar.bz2
36+
tar xvf opendylan-2023.1-x86_64-darwin.tar.bz2
37+
fi
38+
echo "`pwd`/opendylan-2023.1/bin" >> $GITHUB_PATH
39+
40+
- name: "Build with batteries"
41+
run: ./build/unix/release-with-batteries.sh
42+
43+
- uses: actions/upload-artifact@v4
44+
with:
45+
name: release-tarball
46+
# TODO: appropriate path based on architecture and release
47+
path: release/opendylan-2023.1-x86_64-darwin.tar.bz2
48+
compression-level: 0
49+
retention-days: 3
50+
overwrite: true
51+
if-no-files-found: error

0 commit comments

Comments
 (0)