-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Swift 6.0 and removal of linux buildcontainer
- Loading branch information
GitHub Automation
committed
Oct 18, 2024
1 parent
888fad1
commit 21307f6
Showing
1 changed file
with
12 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,10 +30,10 @@ on: | |
env: | ||
spm-build-options: -Xswiftc -enable-testing --explicit-target-dependency-import-check error | ||
spm-test-options: --parallel | ||
swift-version: '5.10' | ||
swift-version: '6.0' | ||
|
||
jobs: | ||
build-devcontainer-linux: | ||
build-linux: | ||
name: "Build and test: ${{ matrix.host.os }}/${{ inputs.build-type }}" | ||
strategy: | ||
fail-fast: false | ||
|
@@ -52,42 +52,20 @@ jobs: | |
with: | ||
submodules: 'true' | ||
|
||
- uses: actions/cache@v4 | ||
with: | ||
path: .build | ||
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} | ||
restore-keys: | | ||
${{ runner.os }}-spm- | ||
- name: Create artifact directory | ||
run: mkdir -p /home/runner/work/hylo-lsp/hylo-lsp/artifacts | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
- name: Setup swift | ||
uses: SwiftyLab/setup-swift@latest | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
swift-version: ${{ env.swift-version }} | ||
|
||
- name: devcontainer pre-setup | ||
run: cp hylo/.devcontainer/make-pkgconfig.sh .devcontainer/ | ||
- run: swift --version | ||
|
||
- name: Build (${{ inputs.build-type }}) | ||
uses: devcontainers/[email protected] | ||
with: | ||
imageName: ghcr.io/koliyo/hylo-lsp-swift-devcontainer | ||
cacheFrom: ghcr.io/koliyo/hylo-lsp-swift-devcontainer | ||
runCmd: | | ||
set -eo pipefail | ||
swift build -c ${{ inputs.build-type }} ${{ matrix.host.build-options }} | ||
BUILD_DIR=$(swift build -c ${{ inputs.build-type }} --show-bin-path) | ||
echo "BUILD_DIR=$BUILD_DIR" >> $GITHUB_ENV | ||
cp $BUILD_DIR/hylo-lsp-client $BUILD_DIR/hylo-lsp-server /artifacts/ | ||
# swift test -c ${{ inputs.build-type }} ${{ matrix.host.test-options }} | | ||
# tee testoutput.txt && ( | ||
# (grep -q "[.']EndToEndTests[/. ]test_" testoutput.txt && grep -q "[.']HyloTests[/. ]test_" testoutput.txt) || | ||
# (echo "error: generated tests failed to run; see | ||
# https://github.com/apple/swift-package-manager/issues/6595" && false) ) | ||
id: build | ||
run: | | ||
set -eo pipefail | ||
swift build -c ${{ inputs.build-type }} ${{ matrix.host.build-options }} | ||
BUILD_DIR=$(swift build -c ${{ inputs.build-type }} --show-bin-path) | ||
echo "BUILD_DIR=$BUILD_DIR" >> $GITHUB_ENV | ||
# - name: Check code coverage | ||
# uses: mattpolzin/[email protected] | ||
|