
This commit adds support for LLVM 16 and switches to it by default. That means three LLVM versions are supported at the same time: LLVM 14, 15, and 16. This commit includes work by QuLogic: * Part of this work was based on a PR by QuLogic: https://github.com/tinygo-org/tinygo/pull/3649 But I also had parts of this already implemented in an old branch I already made for LLVM 16. * QuLogic also provided a CGo fix here, which is also incorporated in this commit: https://github.com/tinygo-org/tinygo/pull/3869 The difference with the original PR by QuLogic is that this commit is more complete: * It switches to LLVM 16 by default. * It updates some things to also make it work with a self-built LLVM. * It fixes the CGo bug in a slightly different way, and also fixes another one not included in the original PR. * It does not keep compiler tests passing on older LLVM versions. I have found this to be quite burdensome and therefore don't generally do this - the smoke tests should hopefully catch most regressions.
100 строки
3,8 КиБ
YAML
100 строки
3,8 КиБ
YAML
# This is the Github action to build and push the tinygo/tinygo-dev Docker image.
|
|
# If you are looking for the tinygo/tinygo "release" Docker image please see
|
|
# https://github.com/tinygo-org/docker
|
|
#
|
|
name: Docker
|
|
on:
|
|
push:
|
|
branches: [ dev, fix-docker-llvm-build ]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
push_to_registry:
|
|
name: build-push-dev
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
packages: write
|
|
contents: read
|
|
steps:
|
|
- name: Check out the repo
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
- name: Docker meta
|
|
id: meta
|
|
uses: docker/metadata-action@v4
|
|
with:
|
|
images: |
|
|
tinygo/tinygo-dev
|
|
ghcr.io/${{ github.repository_owner }}/tinygo-dev
|
|
tags: |
|
|
type=sha,format=long
|
|
type=raw,value=latest
|
|
- name: Log in to Docker Hub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
|
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
|
- name: Log in to Github Container Registry
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
build-contexts: tinygo-llvm-build=docker-image://tinygo/llvm-16
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|
|
- name: Trigger Drivers repo build on Github Actions
|
|
run: |
|
|
curl -X POST \
|
|
-H "Authorization: Bearer ${{secrets.GHA_ACCESS_TOKEN}}" \
|
|
-H "Accept: application/vnd.github.v3+json" \
|
|
https://api.github.com/repos/tinygo-org/drivers/actions/workflows/build.yml/dispatches \
|
|
-d '{"ref": "dev"}'
|
|
- name: Trigger Bluetooth repo build on Github Actions
|
|
run: |
|
|
curl -X POST \
|
|
-H "Authorization: Bearer ${{secrets.GHA_ACCESS_TOKEN}}" \
|
|
-H "Accept: application/vnd.github.v3+json" \
|
|
https://api.github.com/repos/tinygo-org/bluetooth/actions/workflows/linux.yml/dispatches \
|
|
-d '{"ref": "dev"}'
|
|
- name: Trigger TinyFS repo build on Github Actions
|
|
run: |
|
|
curl -X POST \
|
|
-H "Authorization: Bearer ${{secrets.GHA_ACCESS_TOKEN}}" \
|
|
-H "Accept: application/vnd.github.v3+json" \
|
|
https://api.github.com/repos/tinygo-org/tinyfs/actions/workflows/build.yml/dispatches \
|
|
-d '{"ref": "dev"}'
|
|
- name: Trigger TinyFont repo build on Github Actions
|
|
run: |
|
|
curl -X POST \
|
|
-H "Authorization: Bearer ${{secrets.GHA_ACCESS_TOKEN}}" \
|
|
-H "Accept: application/vnd.github.v3+json" \
|
|
https://api.github.com/repos/tinygo-org/tinyfont/actions/workflows/build.yml/dispatches \
|
|
-d '{"ref": "dev"}'
|
|
- name: Trigger TinyDraw repo build on Github Actions
|
|
run: |
|
|
curl -X POST \
|
|
-H "Authorization: Bearer ${{secrets.GHA_ACCESS_TOKEN}}" \
|
|
-H "Accept: application/vnd.github.v3+json" \
|
|
https://api.github.com/repos/tinygo-org/tinydraw/actions/workflows/build.yml/dispatches \
|
|
-d '{"ref": "dev"}'
|
|
- name: Trigger TinyTerm repo build on Github Actions
|
|
run: |
|
|
curl -X POST \
|
|
-H "Authorization: Bearer ${{secrets.GHA_ACCESS_TOKEN}}" \
|
|
-H "Accept: application/vnd.github.v3+json" \
|
|
https://api.github.com/repos/tinygo-org/tinyterm/actions/workflows/build.yml/dispatches \
|
|
-d '{"ref": "dev"}'
|