diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 04a24c3b0..98ec8039d 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,7 +2,7 @@ // README at: https://github.com/devcontainers/templates/tree/main/src/alpine { // ref: https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers#dockerfile - "image": "docker.io/kcllang/kcl-builder:latest", + "image": "docker.io/kcllang/kcl-builder:centos7", "customizations": { "vscode": { "extensions": [ diff --git a/.github/workflows/build-test-centos7.yaml b/.github/workflows/build-test-centos7.yaml index ffa64477a..e23471744 100644 --- a/.github/workflows/build-test-centos7.yaml +++ b/.github/workflows/build-test-centos7.yaml @@ -6,19 +6,32 @@ jobs: build-and-test-centos7: name: Build and Test on Linux ARM64 runs-on: ubuntu-latest - container: kcllang/kcl-builder:centos7 steps: - name: Check out code uses: actions/checkout@v3 with: submodules: "true" - - name: Run custom ARM64 Docker image + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: linux/amd64,linux/arm64 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Pull custom ARM64 Docker image + run: | + docker pull --platform linux/arm64 kcllang/kcl-builder:centos7 + + - name: Release run: | - source ~/.bash_profile - cat ~/.bash_profile - export PATH=$PATH:/opt/build/bin && sed -i '' 's/llvm12/llvm7/g' kclvm/compiler/Cargo.toml - make && make release + docker run --rm --platform linux/arm64 \ + -v ${{ github.workspace }}:/workspace -w /workspace \ + kcllang/kcl-builder-arm64 \ + source ~/.bash_profile && + export PATH=$PATH:/opt/build/bin/ && sed -i 's/llvm12/llvm7/g' kclvm/compiler/Cargo.toml && + make && make release - name: Upload Artifact uses: actions/upload-artifact@v3